Aurigma Graphics Mill 5.5 for .NET
BitmapData..::.Scan0 Property
Returns the pointer to the very first pixel of this BitmapData.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
Visual Basic
Public ReadOnly Property Scan0 As IntPtr
C#
public IntPtr Scan0 { get; }
Property Value
The address of the first pixel of this BitmapData.Examples
C#
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);