How to convert JPEG image into a binary data?

Discussion in 'ASP .Net' started by Lucas Cowald, Oct 15, 2003.

  1. Lucas Cowald

    Lucas Cowald Guest

    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.
     
    Lucas Cowald, Oct 15, 2003
    #1
    1. Advertising

  2. Here's a good reference for you, on the Microsoft .Net SDK online:

    http://msdn.microsoft.com/library/d...us/cpguide/html/cpcondrawingeditingimages.asp

    --
    HTH,

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

    "Lucas Cowald" <> wrote in message
    news:...
    > 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.
    >
    >
    >
     
    Kevin Spencer, Oct 15, 2003
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:...
    > 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.
    >
    >
    >
     
    Steve C. Orr [MVP, MCSD], Oct 15, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lucas Cowald

    How to convert JPEG image into a binary data?

    Lucas Cowald, Oct 15, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    331
    Victor Garcia Aprea [MVP]
    Oct 19, 2003
  2. Lucas Cowald

    How to convert JPEG image into a binary data?

    Lucas Cowald, Oct 15, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    184
    Lucas Cowald
    Oct 15, 2003
  3. Lucas Cowald

    How to convert JPEG image into a binary data?

    Lucas Cowald, Oct 15, 2003, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    149
    Lucas Cowald
    Oct 15, 2003
  4. Lucas Cowald

    How to convert JPEG image into a binary data?

    Lucas Cowald, Oct 15, 2003, in forum: ASP .Net Security
    Replies:
    1
    Views:
    331
    Steve Jansen
    Oct 15, 2003
  5. Lucas Cowald

    How to convert JPEG image into a binary data?

    Lucas Cowald, Oct 15, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    439
    Jan Limpens
    Oct 15, 2003
Loading...

Share This Page