472,377 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,377 software developers and data experts.

How to convert JPEG image into a binary data?

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.

Nov 17 '05 #1
2 16854
Here's a good reference for you, on the Microsoft .Net SDK online:

http://msdn.microsoft.com/library/de...tingimages.asp

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Lucas Cowald" <no****@nospamthanks.com> wrote in message
news:nN********************@comcast.com...
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.

Nov 17 '05 #2
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?

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Lucas Cowald" <no****@nospamthanks.com> wrote in message
news:nN********************@comcast.com...
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.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Johann Blake | last post by:
In my need to decode a JPEG 2000 file, I discovered like many that there was no functionality for this in the .NET Framework. Instead of forking out a pile of cash to do this, I came up with the...
0
by: Lucas Cowald | last post by:
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...
1
by: Daniel | last post by:
I have looked everywhere on the web for an answer to this and the only thing I can find is converting the image format when the file is present on the local filesystem. What I want to do is use a...
7
by: Scott Schluer | last post by:
Is there a way to use the Image class to convert a color photo (GIF or JPEG) to a B&W photo? Thanks, Scott
1
by: Jonas | last post by:
Hi! When i use the code below to convert a wmf to a jpg image, the output will always be with a black backgound. ("data" is a byte array containing the WMF file) System.IO.MemoryStream ms =...
3
by: Dennis | last post by:
I am trying to convert a bitmap to a JPEG MemoryStream and return a Byte array containing the resulting JPEG Image as follows: Public Function BmpToJPEG(ByVal BitMapIn As Bitmap, ByVal Quality As...
5
by: jayharvard1 | last post by:
Hello All. I'm trying to create jpegs out of data that is stored in a binary blob format in an RDBMS (MS Access). I've tried writing the jpeg directly: while not rs.EOF: op = file(imgdir + "\\"...
3
by: Richard Coltrane | last post by:
Hello, If i take a jpeg and pipe it from a binary reader to a binary writer, everything is fine and I can still use it. If i take that same jpeg and piping code and simply add a byte encoded...
1
by: markurxn | last post by:
I need a solution to automatically change the DPI of uploaded photos from 300 to 72. I've coded this bit of script to read the 14th through 18th bit of binary data of a JPEG and update the DPI. The...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: F22F35 | last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.