IIXC_Page::GetPixel Method

From PDF XChange PDF SDK
Revision as of 03:03, 21 May 2015 by Dsbot (Talk | contribs) (Automatic page editing by robot)

Jump to: navigation, search

The method retrieves the color value of the pixel at the specified coordinates.

Syntax

HRESULT GetPixel([in]           LONG    ptX,
                 [in]           LONG    ptY,
                 [out, retval]  ULONG*  pColor);

Parameters

ptX
[in] Specifies x-coordinate of the pixel to be examined.
ptY
[in] Specifies y-coordinate of the pixel to be examined.
pColor
[out, retval] Pointer to ULONG variable which will receive the color of the pixel. This parameter cannot be NULL.

Return Value

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

Remarks

For all raster internal formats, the function returns the red, green, and blue components of the pixel's color. If the page has an alpha channel (Gray with Alpha, or TrueColor with Alpha), the high-order byte of the color will contain the value of the specified pixel's alpha channel. For indexed images, the high-order byte will contain the page palette index of the pixel's color.

See Also

IIXC_Page
IIXC_Page::SetPixel
IIXC_Page::GetPixelIndex
IIXC_Page::SetPixelIndex