# BitmapData class

Namespace: [Eto.Drawing](https://eto.picoe.ca/api/namespace/eto.drawing.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
public abstract class BitmapData : IDisposable
```

Bitmap data information when accessing a [Bitmap](https://eto.picoe.ca/api/type/eto.drawing.bitmap.md)'s data directly

**Remarks:** The bitmap data is accessed through [Bitmap.Lock()](https://eto.picoe.ca/api/type/eto.drawing.bitmap/lock.md), which locks the data for direct access using the [BitmapData.Data](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/data.md) pointer. Ensure you call dispose the instance when you are done accessing or writing the data, otherwise the bitmap may be left in an unusable state.

## Constructors

- [BitmapData](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/ctor.md): (2 overloads) Initializes a new instance of the BitmapData class

## Properties

- [BitsPerPixel](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/bitsperpixel.md): Gets the bits per pixel
- [BytesPerPixel](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/bytesperpixel.md): Gets the bytes per pixel
- [ControlObject](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/controlobject.md): Gets the platform-specific control object for the bitmap data
- [Data](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/data.md): Gets the pointer to the data of the bitmap
- [Flipped](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/flipped.md): Gets a value indicating that the data is flipped (upside down)
- [Image](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/image.md): Gets the image this data is for
- [PremultipliedAlpha](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/premultipliedalpha.md): Gets a value indicating the RGB components are premultiplied with the alpha component
- [ScanWidth](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/scanwidth.md): Gets the width (in bytes) of each scan line (row) of pixel data

## Methods

- [Dispose](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/dispose.md): (2 overloads) Releases all resource used by the [BitmapData](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata.md) object.
- [GetPixel](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/getpixel.md): (2 overloads) Gets the color of the pixel at the specified coordinates.
- [GetPixels](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/getpixels.md): Gets an enumerable of pixels for each scan line from top to bottom.
- [SetPixel](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/setpixel.md): (2 overloads) Sets the pixel color at the specified coordinates.
- [SetPixels](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/setpixels.md): Use this to set the pixels of the bitmap from an array or other source.
- [TranslateArgbToData](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/translateargbtodata.md): Translates a 32-bit ARGB value to the platform specific pixel format value
- [TranslateDataToArgb](https://eto.picoe.ca/api/type/eto.drawing.bitmapdata/translatedatatoargb.md): Translates the platform specific pixel format to a 32-bit ARGB value
