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

CImage::GetBits

Retrieves a pointer to the actual bit values of a given pixel in a bitmap.

void* GetBits( ) throw( );

A pointer to the bitmap buffer. If the bitmap is a bottom-up DIB, the pointer points near the end of the buffer. If the bitmap is a top-down DIB, the pointer points to the first byte of the buffer.

Using this pointer, along with the value returned by GetPitch, you can locate and change individual pixels in an image.

Note Note

This method supports only DIB section bitmaps; consequently, you access the pixels of a CImage object the same way you would the pixels of a DIB section. The returned pointer points to the pixel at the location (0, 0).

Header: atlimage.h

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