Export (0) Print
Expand All

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.

NoteNote

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).

Community Additions

ADD
Show:
© 2014 Microsoft