Hi,
Problem No1. My own Related problem
I asked the next question here
Now the Problem No 2 is.
When i am trying to open 16 Bit (Monocrome ) images from their raw pixel data then i am getting Error. Because i am using PixelFormat.Format16bppGrayscale on creation of Bitmap like
Bitmap bmp = new Bitmap(Img_Width, Img_Height,PixelFormat.Format16bppGrayscale);
So googled and found Format16bppGrayscale not supported so i modifed my code like below.
PixelFormat format = PixelFormat.Format16bppRgb565;
Bitmap bmp = new Bitmap(Img_Width, Img_Height, format);
Rectangle rect = new Rectangle(0, 0, Img_Width, Img_Height);
BitmapData bmpData = bmp.LockBits(rect, ImageLockMode.ReadWrite, format);
Marshal.Copy(rawPixel, 0, bmpData.Scan0, rawPixel.Length);
bmp.UnlockBits(bmpData);
Amazing thing is that i am getting the image now because i change the pixelFormat. But problem is that My monocrome (Grayscale) image look in various color.
How can i get the original appearance. I tried several grayscale method but not successful Please give me some unsafe code. Thanks,