Click or drag to resize

IndexedBitmapLock Method

Locks the data of the image to directly access the bytes of the image

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public BitmapData Lock()

Return Value

Type: BitmapData
A BitmapData object that carries a pointer and functions for manipulating the data directly
Remarks
This locks the data to read and write to directly using unsafe pointers. After reading or updating the data, you must call Dispose to unlock the data before using the bitmap. e.g.:
using (var bd = bitmap.Lock ()) {
    byte* pdata = bd.Data;
    // access data
}
See Also