-1

So I know there are plenty of examples of how to make a Bmp from a byte[], but I have to return a byte[] so it can be loaded by a webpage.

I have a Bmp that I did some processing on and I want to create a new byte[] with those changes to the webpage.

If it matters I think the image was originally a jpeg, but ideally I would want this to work for any image format.

Oded
  • 477,625
  • 97
  • 867
  • 998
dudebroman
  • 256
  • 2
  • 4
  • 12

1 Answers1

3

.Save() the bitmap to a MemoryStream. Return yourMemoryStream.ToArray()

hometoast
  • 11,293
  • 4
  • 39
  • 57