0

I'd want to save that byte[] into Bitmap, but it throws that parameter is not validat new Bitmap(ms) why? what requirements does it have?

var bytes = new byte[] { 0x01, 0x02, 1 };
Bitmap bmp;
using (var ms = new MemoryStream(bytes))
{
    bmp = new Bitmap(ms);
    bmp.Save(@"C:\bit.bmp");
}
Axelly
  • 955
  • 1
  • 6
  • 17

0 Answers0