Skip to main content

ImageLockMode

Namespace: System.Drawing.Imaging

Assembly: System.Drawing.Managed (4.0.0.0)

Specifies flags that are passed to the flags parameter of the LockBits method. TheLockBits method locks a portion of an image so that you can read or write the pixel data.

public enum ImageLockMode : Enum

Fields

NameDescription
ReadOnlySpecifies that a portion of the image is locked for reading.
ReadWriteSpecifies that a portion of the image is locked for reading or writing.
UserInputBufferSpecifies that the buffer used for reading or writing pixel data is allocated by the user. If this flag is set, the flags parameter of the LockBits method serves as an input parameter (and possibly as an output parameter). If this flag is cleared, then the flags parameter serves only as an output parameter.
WriteOnlySpecifies that a portion of the image is locked for writing.

Used By

NameDescription
Bitmap.LockBitsLocks a portion of the bitmap for direct pixel manipulation.