Returns the pointer to the very first pixel of this BitmapData.
Namespace:
Aurigma.GraphicsMill
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Public ReadOnly Property Scan0 As IntPtr
public IntPtr Scan0 { get; }
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);