Delen via


CImage::GetPitch

Retrieves the pitch of an image.

int GetPitch( ) const throw( );

Return Value

The pitch of the image. If the return value is negative, the bitmap is a bottom-up DIB and its origin is the lower left corner. If the return value is positive, the bitmap is a top-down DIB and its origin is the upper left corner.

Remarks

The pitch is the distance, in bytes, between two memory addresses that represent the beginning of one bitmap line and the beginning of the next bitmap line. Because pitch is measured in bytes, the pitch of an image helps you to determine the pixel format. The pitch can also include additional memory, reserved for the bitmap.

Use GetPitch with GetBits to find individual pixels of an image.

Note

This method supports only DIB section bitmaps.

Requirements

Header: atlimage.h

See Also

Reference

CImage Class

CImage::GetPixelAddress

CImage::GetWidth

CImage::GetHeight

Other Resources

CImage Members