<PackageReference Include="System.Drawing.Common" Version="8.0.14" />

ImageLockMode

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

Specifies that a portion of the image is locked for reading.

Specifies that a portion of the image is locked for reading or writing.

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

Specifies that a portion of the image is locked for writing.