1

My understanding of a progressive jpg is that it saves the color information of each pixel in a different order, to create the progressive loading effect. I.e. instead of RGB RGB RGB ..., it's saved like RRRR... GGGG... BBBB.... (https://imagemagick.org/script/command-line-options.php#interlace)

If this is true, is it possible to convert a jpg to a progressive jpg without any loss in quality? It seems to be reordering of data rather than needing to go through the jpg compression algorithm.

4
  • 1
    What is the problem you're trying to solve? Why do you need to convert a jpg to a progressive jpg? – Saaru Lindestøkke Jan 26 at 10:43
  • not true, jpg does not save pixels, does not save RGB pixels and progressive jpg does not interleave pixels in a different order – szulat Jan 26 at 11:01
  • Progressive JPEG was useful in the days of slow networks but this is somewhat less true today. Furthermore, progressive JPEG is not supported by many LCD photo frames. – xenoid Jan 26 at 14:55
  • @SaaruLindestøkke i wanted to use progressive jpegs for a website – zli Jan 26 at 20:55
6

To convert a baseline JPEG to a progressive JPEG in a lossless manner you can use jpegtran:

jpegtran works by rearranging the compressed data (DCT coefficients), without ever fully decoding the image. Therefore, its transformations are lossless: there is no image degradation at all

It has a -progressive option that creates a progressive JPEG file, e.g.:

jpegtran -progressive foo.jpg > fooprog.jpg

If you search the web for "install jpegtran [your OS here]" you will find various resources explaining how you can obtain jpegtran.

0
0

I also wonder why you would need to do this. For a website you are dealing with small image sizes and progressive jpegs only save significant space whendealing with large files. It is completely unnecessary with small files and there could be compatibility issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.