How to convert JPEG image into a binary data?

  • Thread starter Thread starter Lucas Cowald
  • Start date Start date
L

Lucas Cowald

Hi,

Using ASP and VBScript. How to convert JPEG image into a binary data? Is it
possible with a command from ASP / VBScript without having to put it into a
database first?

I want to take the JPEG image from a folder, convert it into a binary data,
and stream it to the browser. How can I do it? Can you show a short code?

Thank you for your help.
 
You can turn an image into a binary stream with code like this:

Dim ms As New System.IO.MemoryStream()
MyImage.Save(ms, Drawing.Imaging.ImageFormat.Jpeg)

But I don't know what you expect the browser to do with this.
What are you trying to accomplish?
 
Back
Top