Skip to content

IGR_Get_Page_Pixels

The IGR_Get_Page_Pixels method provides low-level access to a rectangular portion of the page and provides a temporary buffer that you can use to read the pixel data in a specified format.

The caller must call IGR_Free_Page_Pixels when done processing the pixel data.

Prototype

IGR_LONG IGR_Get_Page_Pixels (
        HPAGE pageHandle,
        const struct IGR_Rect* sourceRect,
        const struct IGR_Size* destSize,
        IGR_ULONG flags,
        const IGR_UCS2* options,
        IGR_OPEN_BITMAP_PIXEL_TYPE pixel_format,
        struct IGR_Page_Pixels* pixel_data,
        Error_Control_Block* error);

Parameters

pageHandle: HPAGE

Handle to a page opened by a call to IGR_Open_Page.

sourceRect: Pointer to IGR_Rect

Pointer to a rectangle that specifies the section of the page to copy.

May be NULL to copy the entire page.

destSize: Pointer to IGR_Size

Pointer to a size that specifies the requested output size for the copied pixels.

flags: IGR_LONG

A set of flags that indicate processing options.

IGR_GET_PAGE_PIXELS_BUFFER_ALLOCATED: indicates that (name) buffer is preallocated by the caller and should be filled.

options: Pointer to Unicode String

Extended processing options as name=value, semicolon separated.

pixel_format: IGR_OPEN_BITMAP_PIXEL_TYPE

Integer that specifies the format of the pixel data in the temporary buffer. The pixel format of the temporary buffer does not have to be the same as the pixel format as the page.

pixel_data: Pointer to IGR_Page_Pixels

If IGR_GET_PAGE_PIXELS_BUFFER_ALLOCATED is not set, pixel_data serves only as an output parameter. The scanline0 data member is set to a pointer to a temporary buffer, which is filled with the requested pixel data.

If IGR_GET_PAGE_PIXELS_BUFFER_ALLOCATED is set, the caller must initial the width, height, stride and scanline0 members of the struct with the details of the pre-allocated buffer.

error: Pointer to Error_Control_Block

Returns error details if the call fail.

Return value

Success: IGR_LONG

Returns IGR_OK.

Failure: IGR_LONG

Returns one of the possible IGR_E error codes.

See also