IIXC_Inst::Page_CreateFromMemory Method

From PDF XChange PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
m (Automatic page editing by robot)
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
[[Category:Editor]]
 
[[Category:Editor]]
 
{{#customTitle:IIXC_Inst::Page_CreateFromMemory Method}}
 
{{#customTitle:IIXC_Inst::Page_CreateFromMemory Method}}
{{#parentPage:PXV:IIXC_Inst#Methods|Page_CreateFromMemory Method|method}}
+
{{#parentPage:PXV:IIXC_Inst#Methods|Page_CreateFromMemory|method}}
 
{{ToWrite}}
 
{{ToWrite}}
 
{{ToReview}}
 
{{ToReview}}
Line 9: Line 9:
  
 
== Syntax ==
 
== Syntax ==
<pre class="brush:cpp;gutter:false">HRESULT Page_CreateFromMemory([in]          ULONG          Width,
+
<pre class="brush:cpp;gutter:false">HRESULT Page_CreateFromMemory([in]          ULONG          nWidth,
                               [in]          ULONG          Height,
+
                               [in]          ULONG          nHeight,
                               [in]          IXC_MemoryType  memType,
+
                               [in]          IXC_MemoryType  nMemType,
                               [in]          ULONG          numColors,
+
                               [in]          ULONG          nNumColors,
                               [in]          ULONG*          palette,
+
                               [in]          ULONG*          pPalette,
 
                               [in]          UCHAR*          pData,
 
                               [in]          UCHAR*          pData,
 
                               [in]          LONG            nOffset,
 
                               [in]          LONG            nOffset,
                               [in]          ULONG          dataSize,
+
                               [in]          ULONG          nDataSize,
 
                               [in]          ULONG          nFlags,
 
                               [in]          ULONG          nFlags,
                               [out, retval]  IIXC_Page**    ppPage);</pre>
+
                               [out, retval]  IIXC_Page**    pPage);</pre>
  
 
== Parameters ==
 
== Parameters ==
;Width
+
;nWidth
 
:[in]  Specifies the real width of the image in pixels. This value must be positive.
 
:[in]  Specifies the real width of the image in pixels. This value must be positive.
;Height
+
;nHeight
 
:[in]  Specifies the real height of the image in pixels. This value must be positive.
 
:[in]  Specifies the real height of the image in pixels. This value must be positive.
;memType
+
;nMemType
 
:[in]  Value of [[PXV:IXC_MemoryType|IXC_MemoryType]] specifies the image type.
 
:[in]  Value of [[PXV:IXC_MemoryType|IXC_MemoryType]] specifies the image type.
;numColors
+
;nNumColors
 
:[in]  Specifies the length of the palette array. If palette is NULL, palcount must be set to a value of 0.
 
:[in]  Specifies the length of the palette array. If palette is NULL, palcount must be set to a value of 0.
;palette
+
;pPalette
 
:[in]  Specifies the pointer to the image palette. The palette consists of an array of palcount RGBQUAD elements. The length of palette depends on the memtype. For some image types this parameter may be NULL.
 
:[in]  Specifies the pointer to the image palette. The palette consists of an array of palcount RGBQUAD elements. The length of palette depends on the memtype. For some image types this parameter may be NULL.
 
;pData
 
;pData
Line 35: Line 35:
 
;nOffset
 
;nOffset
 
:[in]  This parameter specifies the length in bytes of one row of the image. For all image types, except MemoryType_4RLE and MemoryType_8RLE, this parameter cannot be 0. If the data is a pointer to the last image row (the image is flipped type, for example, .BMP), stride must be expressed as a negative value. The function will increment the data pointer with a stride value to seek the next line in the image, so this parameter may be negative.
 
:[in]  This parameter specifies the length in bytes of one row of the image. For all image types, except MemoryType_4RLE and MemoryType_8RLE, this parameter cannot be 0. If the data is a pointer to the last image row (the image is flipped type, for example, .BMP), stride must be expressed as a negative value. The function will increment the data pointer with a stride value to seek the next line in the image, so this parameter may be negative.
;dataSize
+
;nDataSize
 
:[in]  Specifies the length of the data.
 
:[in]  Specifies the length of the data.
 
;nFlags
 
;nFlags
 
:[in]  Value of ULONG.
 
:[in]  Value of ULONG.
;ppPage
+
;pPage
 
:[out, retval]  Pointer to [[PXV:IIXC_Page|IIXC_Page]] variable that receives the handle of created page.
 
:[out, retval]  Pointer to [[PXV:IIXC_Page|IIXC_Page]] variable that receives the handle of created page.
  
Line 49: Line 49:
  
 
== See Also ==
 
== See Also ==
:[[PXV:IIXC_Inst|IIXC_Inst]].
+
[[PXV:IIXC_Inst|IIXC_Inst]]
:[[PXV:IXC_MemoryType|IXC_MemoryType]]
+
:[[PXV:IIXC_Page|IIXC_Page]]
+
:[[PXV:IIXC_Inst_Page_CreateFromClipboard|IIXC_Inst::Page_CreateFromClipboard]]
+
:[[PXV:IIXC_Inst_Page_CreateFromHBITMAP|IIXC_Inst::Page_CreateFromHBITMAP]]
+
:[[PXV:IIXC_Inst_Page_CreateEmpty|IIXC_Inst::Page_CreateEmpty]]
+

Latest revision as of 01:46, 12 August 2015


The method creates a new page from the contents of a memory buffer. The memory data can be present as raw data or as compressed data (currently RLE4 and RLE8 compression methods are supported).

Syntax

HRESULT Page_CreateFromMemory([in]           ULONG           nWidth,
                              [in]           ULONG           nHeight,
                              [in]           IXC_MemoryType  nMemType,
                              [in]           ULONG           nNumColors,
                              [in]           ULONG*          pPalette,
                              [in]           UCHAR*          pData,
                              [in]           LONG            nOffset,
                              [in]           ULONG           nDataSize,
                              [in]           ULONG           nFlags,
                              [out, retval]  IIXC_Page**     pPage);

Parameters

nWidth
[in] Specifies the real width of the image in pixels. This value must be positive.
nHeight
[in] Specifies the real height of the image in pixels. This value must be positive.
nMemType
[in] Value of IXC_MemoryType specifies the image type.
nNumColors
[in] Specifies the length of the palette array. If palette is NULL, palcount must be set to a value of 0.
pPalette
[in] Specifies the pointer to the image palette. The palette consists of an array of palcount RGBQUAD elements. The length of palette depends on the memtype. For some image types this parameter may be NULL.
pData
[in] Specifies the image data. This parameter cannot be NULL. The length of this buffer must be sufficient to contain all the image data and depends on the width, height and memtype.
nOffset
[in] This parameter specifies the length in bytes of one row of the image. For all image types, except MemoryType_4RLE and MemoryType_8RLE, this parameter cannot be 0. If the data is a pointer to the last image row (the image is flipped type, for example, .BMP), stride must be expressed as a negative value. The function will increment the data pointer with a stride value to seek the next line in the image, so this parameter may be negative.
nDataSize
[in] Specifies the length of the data.
nFlags
[in] Value of ULONG.
pPage
[out, retval] Pointer to IIXC_Page variable that receives the handle of created page.

Return Value

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

Remarks

Note:
Should any of the specified parameters be incorrect (for example, the specified data buffer is too small) the function may well cause the application to fail and care should be exercised that all required parameters are properly defined to ensure stability within your application.

See Also

IIXC_Inst