IPXC_Document::AddImageFromFile Method
From PDF XChange PDF SDK
m (Automatic page editing by robot) |
m (Automatic page editing by robot) |
||
Line 8: | Line 8: | ||
== Syntax == | == Syntax == | ||
− | <pre class="brush:cpp;gutter:false">HRESULT AddImageFromFile([in] LPWSTR | + | <pre class="brush:cpp;gutter:false">HRESULT AddImageFromFile([in] LPWSTR FileName, |
− | [in, defaultvalue(0)] ULONG | + | [in, defaultvalue(0)] ULONG Page, |
− | [in, defaultvalue(0)] ULONG | + | [in, defaultvalue(0)] ULONG Flags, |
− | [out, retval] IPXC_Image** | + | [out, retval] IPXC_Image** Image);</pre> |
== Parameters == | == Parameters == | ||
− | ; | + | ;FileName |
:[in] Specifies a full file name of the image file. The file should be an image in one of supported format: <tt>BMP</tt>, <tt>PNG</tt>, <tt>GIF</tt>, <tt>ICO</tt>, <tt>PBM</tt>, <tt>PGM</tt>, <tt>PPM</tt>, <tt>JBIG</tt>, <tt>JBIG2</tt>, <tt>JPEG</tt>, <tt>JPEG2000</tt>, <tt>PXC</tt>, <tt>DCX</tt>, <tt>TGA</tt> or <tt>TIFF</tt>. | :[in] Specifies a full file name of the image file. The file should be an image in one of supported format: <tt>BMP</tt>, <tt>PNG</tt>, <tt>GIF</tt>, <tt>ICO</tt>, <tt>PBM</tt>, <tt>PGM</tt>, <tt>PPM</tt>, <tt>JBIG</tt>, <tt>JBIG2</tt>, <tt>JPEG</tt>, <tt>JPEG2000</tt>, <tt>PXC</tt>, <tt>DCX</tt>, <tt>TGA</tt> or <tt>TIFF</tt>. | ||
− | ; | + | ;Page |
:[in, defaultvalue(0)] Specifies the 0-based page number of multipaged image formats (like, <tt>TIFF</tt> or <tt>ICO</tt>) that should be taken. | :[in, defaultvalue(0)] Specifies the 0-based page number of multipaged image formats (like, <tt>TIFF</tt> or <tt>ICO</tt>) that should be taken. | ||
− | ; | + | ;Flags |
:[in, defaultvalue(0)] Specifies additional [[PXV:PXC_ImageToXObjectFlags|flags]] of image creation. | :[in, defaultvalue(0)] Specifies additional [[PXV:PXC_ImageToXObjectFlags|flags]] of image creation. | ||
− | ; | + | ;Image |
:[out, retval] Returns a [[PXV:IPXC_Image|IPXC_Image]] object if new image was successfully added. | :[out, retval] Returns a [[PXV:IPXC_Image|IPXC_Image]] object if new image was successfully added. | ||
Revision as of 05:59, 12 June 2015
Adds new image to the document from specified image file. Image data compressed based on image type (monochrome, indexed, true color) and corresponding encoder array.
Syntax
HRESULT AddImageFromFile([in] LPWSTR FileName, [in, defaultvalue(0)] ULONG Page, [in, defaultvalue(0)] ULONG Flags, [out, retval] IPXC_Image** Image);
Parameters
- FileName
- [in] Specifies a full file name of the image file. The file should be an image in one of supported format: BMP, PNG, GIF, ICO, PBM, PGM, PPM, JBIG, JBIG2, JPEG, JPEG2000, PXC, DCX, TGA or TIFF.
- Page
- [in, defaultvalue(0)] Specifies the 0-based page number of multipaged image formats (like, TIFF or ICO) that should be taken.
- Flags
- [in, defaultvalue(0)] Specifies additional flags of image creation.
- Image
- [out, retval] Returns a IPXC_Image object if new image was successfully added.
Return Value
Returns S_OK if operation was successful or error code in other cases.