How does Bitmap.Save(Stream, ImageFormat) format the data?
- by Matt Jacobsen
I have a non transparent, colour bitmap with length 2480 and width 3507.
Using Bitmap.GetPixel(int x, int y) I am able to get the colour information of each pixel in the bitmap.
If I squirt the bitmap into a byte[]:
MemoryStream ms = new MemoryStream();
bmp.Save(ms, ImageFormat.Bmp);
ms.Position = 0;
byte[] bytes = ms.ToArray();
then I'd…