## Bitmap.LockBits method

Locks a Bitmap into system memory.

```csharp
public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)
```

| Parameter | Type | Description |
| --- | --- | --- |
| rect | Rectangle | A Rectangle structure specifying the portion of the Bitmap to lock. |
| flags | ImageLockMode | An ImageLockMode enumeration specifying the access level (read/write) for the Bitmap. |
| format | PixelFormat | A PixelFormat enumeration specifying the data format of this Bitmap. |

### Return Value

A BitmapData containing information about this lock operation.

### See Also

* class [BitmapData](../../../aspose.drawing.imaging/bitmapdata/)
* struct [Rectangle](../../rectangle/)
* enum [ImageLockMode](../../../aspose.drawing.imaging/imagelockmode/)
* enum [PixelFormat](../../../aspose.drawing.imaging/pixelformat/)
* class [Bitmap](../)
* namespace [Aspose.Drawing](../../bitmap/)
* assembly [Aspose.Drawing.Common](../../../)


