473,468 Members | 1,345 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 17027
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.