There are two ways to save JPEG files: They are baseline JPEG (standard) and progressive JPEG (progressive type). Both formats have the same size and image data, and their extensions are the same, and the only difference is the way they are displayed.
In addition, the size of the progressive image will not be much different from the basic picture size, and may sometimes be smaller than the basic picture. The disadvantage of progressive pictures is to eat the user's CPU and memory, but for the current computer, this picture is not what the calculation.
using(Image Source = Image.FromFile (@"D:\temp\test2.jpg") {ImageCodecInfo codec= Imagecodecinfo.getimageencoders (). First (c = C.mimetype = ="Image/jpeg"); EncoderParameters Parameters=NewEncoderParameters (3); Parameters. param[0] =NewEncoderparameter (System.Drawing.Imaging.Encoder.Quality,100L); Parameters. param[1] =NewEncoderparameter (System.Drawing.Imaging.Encoder.ScanMethod, (int) encodervalue.scanmethodinterlaced); Parameters. param[2] =NewEncoderparameter (System.Drawing.Imaging.Encoder.RenderMethod, (int) encodervalue.renderprogressive); Source. Save (@"D:\temp\saved.jpg", codec, parameters);}
2014/11/28– images into progressive JPEG