Hi,
i sent image byte via bt from j2me phone to c# application,
after i have to create image using this code:
....
byte[] pixels
....
Bitmap bmp = new Bitmap(160, 120, PixelFormat.Format8bppIndexed);
BitmapData d = bmp.LockBits(new Rectangle(0, 0, 160, 120),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
// image data is pixel
Marshal.Copy(pixels, 0, d.Scan0, pixels.Length);
bmp.UnlockBits(d);
// Grey-Scale Palette works
/*
ColorPalette cp = bmp.Palette;
for (int i = 0; i < cp.Entries.Length; i++)
cp.Entries[i] = Color.FromArgb(i, i, i);
bmp.Palette = cp;
*/
this.pictureBox1.Image = bmp;
bmp.Save("C:\\img.bmp");
-----------------
The image that i save has all wrong color...
If i use other than Format8bppIndexed i have smaller size image
repeated on 160x120 pixel with color wrong too
Can someone helps me?
(sorry for bad english)
Thanks