Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CImage::GetPixelAddress

Retrieves the exact address of a pixel.

void* GetPixelAddress( 
   int x, 
   int y  
) throw( );
x

The x-coordinate of the pixel.

y

The y-coordinate of the pixel.

The address is determined according to the coordinates of a pixel, the pitch of the bitmap, and the bits per pixel.

For formats that have less than 8 bits per pixel, this method returns the address of the byte containing the pixel. For example, if your image format has 4 bits per pixel, GetPixelAddress returns the address of the first pixel in the byte, and you must calculate for 2 pixels per byte.

Note Note

This method supports only DIB section bitmaps.

Header: atlimage.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.