Save JPEG in progressive format

A similar question has already been asked in this thread:

Save JPG in progressive format

However, the answer noted mainly suggests that this is not possible. However, given that this is done using other software, this is definitely what C # can do.

Can this be done?

+6
source share
1 answer

Magick.NET can do this with code like this

using (MagickImage image = new MagickImage("input.png")) { // Set the format and write to a stream so ImageMagick won't detect the file type. image.Format = MagickFormat.Pjpeg; using (FileStream fs = new FileStream("output.jpg", FileMode.Create)) { image.Write(fs); } // Write to .jpg file image.Write("PJEG:output.jpg"); // Or to a .pjpeg file image.Write("output.pjpg"); } 

You can find more information here .

+4
source

Source: https://habr.com/ru/post/957419/


All Articles