locked
progressive or baseline jpeg RRS feed

  • Question

  • User1324294081 posted

    hi all !

    i am using an aspx script to resize images on a webserver. after that, the image will be displayed by a macromedia flash program.
    the flash file does not show the image, because the uploaded file is a 'progressive jpeg'. does anybody know how to create a 'baseline' jpeg ?

    see also the snapshot of the code below.

    regards, pjotr.

    <%@ import namespace="System" %> 
    <%@ import namespace="System.Drawing" %> 
    <%@ import namespace="System.Drawing.Imaging" %> 
    <%@ import namespace="System.IO" %> 

    <% 
      ' create image object and load source image in it
      dim g as System.Drawing.Image = System.Drawing.Image.FromFile(request("src")) 
      ' create bitmap object, load image in it, and resize it
      dim imgOutput as New Bitmap(g, request("w"), request("h")) 

      ' save resized image to disk
      imgOutput.save(request("dest"))

      ' clean up image object
      g.dispose() 
      ' clean up bitmap object
      imgOutput.dispose() 

      ' now, the image is resized
    %>
     
     

    Monday, August 22, 2005 3:27 AM

All replies

  • User1324294081 posted

    problem is already solved, the file was an incorrect format. the line

    imgOutput.save(request("dest"))

    should be replaced by

    imgOutput.save(request("dest"), ImageFormat.Jpeg)

    Monday, August 22, 2005 4:39 AM