How to convert JPEG image into a binary data?

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.
 
S

Steve C. Orr [MVP, MCSD]

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top