1
\$\begingroup\$

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.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ What is the problem you're trying to solve? Why do you need to convert a jpg to a progressive jpg? \$\endgroup\$ Commented Jan 26, 2021 at 10:43
  • \$\begingroup\$ not true, jpg does not save pixels, does not save RGB pixels and progressive jpg does not interleave pixels in a different order \$\endgroup\$
    – szulat
    Commented Jan 26, 2021 at 11:01
  • \$\begingroup\$ 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. \$\endgroup\$
    – xenoid
    Commented Jan 26, 2021 at 14:55
  • \$\begingroup\$ @SaaruLindestøkke i wanted to use progressive jpegs for a website \$\endgroup\$
    – zli
    Commented Jan 26, 2021 at 20:55

2 Answers 2

6
\$\begingroup\$

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.

\$\endgroup\$
0
0
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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