Bitmap.LockBits

Bitmap.LockBits method

Locks a Bitmap into system memory.

public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)
ParameterTypeDescription
rectRectangleA Rectangle structure specifying the portion of the Bitmap to lock.
flagsImageLockModeAn ImageLockMode enumeration specifying the access level (read/write) for the Bitmap.
formatPixelFormatA PixelFormat enumeration specifying the data format of this Bitmap.

Return Value

A BitmapData containing information about this lock operation.

See Also