-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
  • 489,969
  • 99
  • 883
  • 1,009
dudebroman
  • 256
  • 2
  • 4
  • 12

1 Answers1

3

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

hometoast
  • 11,522
  • 5
  • 41
  • 58