The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BitmapData class

Applies to: desktop apps only

The BitmapData class is used by the Bitmap::LockBits and Bitmap::UnlockBits methods of the Bitmap class. A BitmapData object stores attributes of a bitmap.

BitmapData has these types of members:

Data Members

The following table lists the members exposed by the BitmapData object.

Data MembersTypeDescription
WidthUINTNumber of pixels in one scan line of the bitmap.
HeightUINTNumber of scan lines in the bitmap.
StrideINTOffset, in bytes, between consecutive scan lines of the bitmap. If the stride is positive, the bitmap is top-down. If the stride is negative, the bitmap is bottom-up.
PixelFormatPixelFormatInteger that specifies the pixel format of the bitmap.
Scan0void *Pointer to the first (index 0) scan line of the bitmap.
ReservedUINT_PTRReserved for future use.



Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server


GDI+ 1.0


Gdiplusimaging.h (include Gdiplus.h)





Send comments about this topic to Microsoft

Build date: 3/6/2012