---
title: "BitmapData..::.Scan0 Property "
canonical: https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_BitmapData_Scan0.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# BitmapData.Scan0 Property 
 
Returns the pointer to the very first pixel of this [BitmapData](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_BitmapData.htm.md).
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public ReadOnly Property Scan0 As IntPtr
```
 
```csharp
public IntPtr Scan0 { get; }
```
 
### Property Value
The address of the first pixel of this [BitmapData](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_BitmapData.htm.md).
 
## Examples
  
```csharp
Aurigma.GraphicsMill.BitmapData bitmapData = bitmap.LockBits();

unsafe
{
    byte* pos;
    byte* scan0 = (byte*)(bitmapData.Scan0.ToPointer());
    int stride = bitmapData.Stride;

    int widthInBytes = bitmapData.Width * bitmapData.BitsPerPixel / 8;
    int height = bitmapData.Height;

    for (int j = 0; j < height; j++)
    {
        pos = scan0 + stride * j;
        for (int i = 0; i < widthInBytes; i++)
        {
            *pos = (byte)(255 - *pos);
            pos++;
        }
    }
}

bitmap.UnlockBits(bitmapData);
```
   
## See Also

### Reference

- [BitmapData Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_BitmapData.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
