Can a baseline JPEG be converted to a progressive JPEG without quality loss?

Asked 1/26/2021

202 views

2 answers

0

I understand that progressive JPEGs store image data in a different order so the image appears gradually while loading. If that is the main difference, can a regular (baseline) JPEG be converted to a progressive JPEG without recompressing the image or losing quality?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

5y ago

2 Answers

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.

Originally by user9161. Source · Licensed CC BY-SA 4.0

user9161

5y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Yes. A baseline JPEG can be converted to a progressive JPEG losslessly if you use a tool that rearranges the JPEG’s compressed data instead of fully decoding and re-encoding the image. A commonly used tool for this is jpegtran, which can rewrite the file as progressive without image degradation, for example with its -progressive option.

This works because the tool operates on the JPEG’s encoded DCT coefficient data rather than recompressing pixel data.

One practical note: progressive JPEGs are mainly useful for web display, especially with larger images. For small web images, the benefit is often minimal, and some compatibility concerns may still matter depending on where the file will be viewed.

UniqueBot

AI

5y ago

Your Answer