IPXC_Document::AddImageFromMemory Method

From PDF XChange PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
m (Automatic page editing by robot)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:IPXC_Document::AddImageFromMemory Method}}
 
{{#customTitle:IPXC_Document::AddImageFromMemory Method}}
 +
{{#parentPage:PXV:IPXC_Document#Methods|AddImageFromMemory|method}}
 +
{{ToReview}}
  
The method of interface of PDF-XChange Editor SDK.
+
Adds a new image into the document based on image data located in the memory. This methods creates an [[PXV:IIXC_Page|image page]] based on memory data and than [[PXV:IPXC_Document_AddImageFromIXCPage]] adds it to the document.
  
 
== Syntax ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT AddImageFromMemory([in] UCHAR* Data, [in] ULONG dataSize, [in] ULONG nWidth, [in] ULONG nHeight, [in] LONG nStride, [in] PXC_ImgMemType nType, [in, defaultvalue(0)] ULONG dwFlags, [out, retval] IPXC_Image** ppImage);</pre>
+
<pre class="brush:cpp;gutter:false">HRESULT AddImageFromMemory([in]                   UCHAR*         Data,
 +
                          [in]                   ULONG           datasize,
 +
                          [in]                   ULONG           nWidth,
 +
                          [in]                   ULONG           nHeight,
 +
                          [in]                   LONG           nStride,
 +
                          [in]                   PXC_ImgMemType nType,
 +
                          [in, defaultvalue(0)] ULONG           dwFlags,
 +
                          [out, retval]         IPXC_Image**   pImage);</pre>
  
 
== Parameters ==
 
== Parameters ==
;''Data''
+
;Data
:[in] Pointer to UCHAR.
+
:[in] Pointer to the start of memory data.
;''dataSize''
+
;datasize
:[in] Value of ULONG.
+
:[in] Specifies a length of the memory data pointed by ''Data'' parameter.
;''nWidth''
+
;nWidth
:[in] Value of ULONG.
+
:[in] Specifies a width of the image in pixels.
;''nHeight''
+
;nHeight
:[in] Value of ULONG.
+
:[in] Specifies a height of the image in pixels.
;''nStride''
+
;nStride
:[in] Value of LONG.
+
:[in] Specifies an amount of bytes the should be added to a pointer to switch to the next line of the image.
;''nType''
+
;nType
:[in] Value of [[PXV:PXC_ImgMemType|PXC_ImgMemType]].
+
:[in] Specifies a kind of [[PXV:PXC_ImgMemType|image organization]] in the memory.
;''dwFlags''
+
;dwFlags
:[in, defaultvalue(0)] Value of ULONG.
+
:[in, defaultvalue(0)] Specifies additional [[PXV:PXC_ImageToXObjectFlags|flags]] of image creation.
;''ppImage''
+
;pImage
:[out, retval] Pointer to [[PXV:IPXC_Image|IPXC_Image]].
+
:[out, retval] Returns an [[PXV:IPXC_Image|IPXC_Image]] object of newly created image.
  
 
== Return Value ==
 
== Return Value ==
Returns S_OK if operation was successful or error code in other cases.
+
Returns <tt>S_OK</tt> if operation was successful or error code in other cases.
  
 
== See Also ==
 
== See Also ==
See also [[PXV:IPXC_Document|IPXC_Document]].
+
[[PXV:IPXC_Document|IPXC_Document]]

Latest revision as of 00:27, 12 August 2015


Adds a new image into the document based on image data located in the memory. This methods creates an image page based on memory data and than IPXC_Document::AddImageFromIXCPage Method adds it to the document.

Syntax

HRESULT AddImageFromMemory([in]                   UCHAR*          Data,
                           [in]                   ULONG           datasize,
                           [in]                   ULONG           nWidth,
                           [in]                   ULONG           nHeight,
                           [in]                   LONG            nStride,
                           [in]                   PXC_ImgMemType  nType,
                           [in, defaultvalue(0)]  ULONG           dwFlags,
                           [out, retval]          IPXC_Image**    pImage);

Parameters

Data
[in] Pointer to the start of memory data.
datasize
[in] Specifies a length of the memory data pointed by Data parameter.
nWidth
[in] Specifies a width of the image in pixels.
nHeight
[in] Specifies a height of the image in pixels.
nStride
[in] Specifies an amount of bytes the should be added to a pointer to switch to the next line of the image.
nType
[in] Specifies a kind of image organization in the memory.
dwFlags
[in, defaultvalue(0)] Specifies additional flags of image creation.
pImage
[out, retval] Returns an IPXC_Image object of newly created image.

Return Value

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

See Also

IPXC_Document