IIXC_Inst::Page_CreateFromMemory Method

From PDF XChange PDF SDK
Revision as of 02:16, 15 June 2015 by Dsbot (Talk | contribs) (Automatic page editing by robot)

Jump to: navigation, search


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           Width,
                              [in]           ULONG           Height,
                              [in]           IXC_MemoryType  memType,
                              [in]           ULONG           numColors,
                              [in]           ULONG*          palette,
                              [in]           UCHAR*          pData,
                              [in]           LONG            nOffset,
                              [in]           ULONG           dataSize,
                              [in]           ULONG           nFlags,
                              [out, retval]  IIXC_Page**     pPage);

Parameters

Width
[in] Specifies the real width of the image in pixels. This value must be positive.
Height
[in] Specifies the real height of the image in pixels. This value must be positive.
memType
[in] Value of IXC_MemoryType specifies the image type.
numColors
[in] Specifies the length of the palette array. If palette is NULL, palcount must be set to a value of 0.
palette
[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.
dataSize
[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