IIXC_Inst::Page_CreateFromMemory Method

From Tracker Software PDF SDK
Jump to: navigation, search
Line 50: Line 50:
 
:[[PXV:IIXC_Inst|IIXC_Inst]].
 
:[[PXV:IIXC_Inst|IIXC_Inst]].
 
:[[PXV:IXC_MemoryType|IXC_MemoryType]]
 
:[[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_CreateFromMemory|IIXC_Inst::Page_CreateFromMemory]]
 +
:[[PXV:IIXC_Inst_Page_CreateEmpty|IIXC_Inst::Page_CreateEmpty]]

Revision as of 05:00, 18 May 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           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**     ppPage);

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.
ppPage
[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.
IXC_MemoryType
IIXC_Page
IIXC_Inst::Page_CreateFromClipboard
IIXC_Inst::Page_CreateFromHBITMAP
IIXC_Inst::Page_CreateFromMemory
IIXC_Inst::Page_CreateEmpty