今天遇到一个问题:
    图像数据存在一个byte[] grayBmp 里面,为8为灰度图像,不知怎么去构造一个bmp?
                byte[] grayBmp = new byte[OtherStride * imgHeight];
                fixed (byte* grayAddr = grayBmp)
                {                
                IntPtr ptr = (IntPtr)grayAddr;
                Bitmap bmp = new Bitmap(OtherStride, imgHeight,OtherStride,PixelFormat.Format8bppIndexed,ptr);
                bmp.Save(fileName, ImageFormat.Bmp);
                }   不知为何出来的都是一副8位彩色图像?不胜感激!