IPXC_Document::AddImageFromFile Method

From Tracker Software PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
Line 6: Line 6:
 
{{ToReview}}
 
{{ToReview}}
  
The method of interface of PDF-XChange Editor SDK.
+
Adds new image to the document from specified image file. Image data compressed based on image type (monochrome, indexed, true color) and corresponding [[PXV:IPXS_EncodeFiltersArray|encoder array]].
  
 
== Syntax ==
 
== Syntax ==
Line 16: Line 16:
 
== Parameters ==
 
== Parameters ==
 
;sFileName
 
;sFileName
:[in] Value of LPWSTR.
+
:[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>.
 
;nPage
 
;nPage
:[in, defaultvalue(0)] Value of ULONG.
+
:[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.
 
;nFlags
 
;nFlags
:[in, defaultvalue(0)] Value of ULONG.
+
:[in, defaultvalue(0)] Specifies additional options. Reserved for future usage and must be '''zero'''.
 
;ppImage
 
;ppImage
 
:[out, retval]  Pointer to [[PXV:IPXC_Image|IPXC_Image]].
 
:[out, retval]  Pointer to [[PXV:IPXC_Image|IPXC_Image]].

Revision as of 16:40, 25 May 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        sFileName,
                         [in, defaultvalue(0)]  ULONG         nPage,
                         [in, defaultvalue(0)]  ULONG         nFlags,
                         [out, retval]          IPXC_Image**  ppImage);

Parameters

sFileName
[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.
nPage
[in, defaultvalue(0)] Specifies the 0-based page number of multipaged image formats (like, TIFF or ICO) that should be taken.
nFlags
[in, defaultvalue(0)] Specifies additional options. Reserved for future usage and must be zero.
ppImage
[out, retval] Pointer to IPXC_Image.

Return Value

Returns S_OK if operation was successful or error code in other cases.

See Also

IPXC_Document