How to save a Non-Progressive JPEG? RRS feed

  • Question

  • User-2085917704 posted

    I have an ASP.NET 2.0 web application that allows users to upload jpeg files.  The application then creates thumbnails of the upload jpeg files and saves them to disk (using C# 2.0).<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    The web application has a Macromedia Flash object and loads the thumbnails that were generated. As you can see from the link below, macromedia flash doesn't supported Progressive jpegs.<o:p></o:p>


    How can I use .NET 2.0 to save a JPEG image as non progressive? Image.Save always saves the image as Progressive.<o:p></o:p>

    Thanks in advantage for your help

    Wednesday, December 28, 2005 12:16 PM

All replies

  • User-2085917704 posted

    Is this even possible? Do someone know for a fact that .Net can't save non-progressive jpeg?


    Tuesday, January 10, 2006 1:42 PM
  • User1155441296 posted

     You can save non progressive jpeg.


    Image imgPhoto = Image.FromFile("FileName")
    //Set Image codec of JPEG type, the index of JPEG codec is "1"
    ImageCodecInfo codec = ImageCodecInfo.GetImageEncoders()[1];
    EncoderParameters eParams = new EncoderParameters(1);
    eParams.Param[0] = new EncoderParameter(Encoder.RenderMethod, EncoderValue.RenderNonProgressive.ToString());
    imgPhoto.Save(savePath, codec, eParams);
    Thursday, September 18, 2008 6:14 AM