TransWikia.com

Can jpg be converted to progressive jpg without quality loss?

Photography Asked on September 2, 2021

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.

2 Answers

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.

Correct answer by Saaru Lindestøkke on September 2, 2021

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.

Answered by user85781 on September 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP