这是我的代码:
BitmapData bmpData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
UnmanagedImage img = new UnmanagedImage(bmpData);
//MAIN BLOCK
BayerDithering filter = new BayerDithering();
img = new UnmanagedImage(img.ImageData, img.Width, img.Height, img.Stride, PixelFormat.Format8bppIndexed);
filter.ApplyInPlace(img);
//END MAIN BLOCK
bitmap.UnlockBits(bmpData);
这是结果:截图
为什么结果没有被编译 Oo?我必须只在“ MAIN BLOCK ”中改变什么?