CImage::GetBits

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

void* GetBits( ) throw( );

Return Value

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.

Remarks

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

备注

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

Requirements

Header: atlimage.h

See Also

Concepts

CImage Class

CImage Members

Device-Independent Bitmaps

GetDIBits

CImage::GetBPP

CImage::GetDC