public unsafe void GetIndexedDataLinearTest()
{
Bitmap Bitmap = new Bitmap(3, 3, PixelFormat.Format8bppIndexed);
Bitmap.LockBitsUnlock(PixelFormat.Format8bppIndexed, (BitmapData) =>
{
byte *Data = (byte *)BitmapData.Scan0.ToPointer();
for (int n = 0; n < 9; n++) Data[n] = (byte)n;
});
Assert.AreEqual(
"000102030405060708",
Bitmap.GetIndexedDataLinear().ToHexString()
);
}