How to convert JPEG image into a binary data?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lucas Cowald

    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.



  • Kevin Spencer

    #2
    Re: How to convert JPEG image into a binary data?

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



    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer

    Big Things are made up of
    Lots of Little Things.

    "Lucas Cowald" <nospam@nospamt hanks.com> wrote in message
    news:nNmdndFEf6 f3lxCiU-KYuA@comcast.co m...[color=blue]
    > Hi,
    >
    > Using ASP and VBScript. How to convert JPEG image into a binary data? Is[/color]
    it[color=blue]
    > possible with a command from ASP / VBScript without having to put it into[/color]
    a[color=blue]
    > database first?
    >
    > I want to take the JPEG image from a folder, convert it into a binary[/color]
    data,[color=blue]
    > and stream it to the browser. How can I do it? Can you show a short code?
    >
    > Thank you for your help.
    >
    >
    >[/color]


    Comment

    • Steve C. Orr [MVP, MCSD]

      #3
      Re: How to convert JPEG image into a binary data?

      You can turn an image into a binary stream with code like this:

      Dim ms As New System.IO.Memor yStream()
      MyImage.Save(ms , Drawing.Imaging .ImageFormat.Jp eg)

      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

      Hire top-notch developers at http://www.able-consulting.com




      "Lucas Cowald" <nospam@nospamt hanks.com> wrote in message
      news:nNmdndFEf6 f3lxCiU-KYuA@comcast.co m...[color=blue]
      > Hi,
      >
      > Using ASP and VBScript. How to convert JPEG image into a binary data? Is[/color]
      it[color=blue]
      > possible with a command from ASP / VBScript without having to put it into[/color]
      a[color=blue]
      > database first?
      >
      > I want to take the JPEG image from a folder, convert it into a binary[/color]
      data,[color=blue]
      > and stream it to the browser. How can I do it? Can you show a short code?
      >
      > Thank you for your help.
      >
      >
      >[/color]


      Comment

      Working...