I received a set of photographs from a photographer and need to confirm that the JPEGs were not saved as Progressive JPEGs. I have Adobe Bridge and Photoshop -- how do I check this?
Some simple methods:
- ImageMagick — On the command line run:
identify -verbose mystery.jpg | grep Interlace
The output will either be “Interlace:JPEG” or “Interlace: None.”
- Photoshop — Open file. Select
File -> Save for Web & Devices.
If it’s a progressive jpeg, the Progressive checkbox will be selected.
- Any browser — Baselines jpegs will load top to bottom, and progressive jpegs will do something else. If the file loads too fast, you may need to add bandwidth throttling. I use ipfw on my Mac.
Check out Detecting Progressive JPEG. The author posts links to a number of scripts people have developed:
A couple of identifying bytes can be used to recognize the files. A progressive DCT-based JPEG can be identified by bytes “0xFF, 0xC2″. Also, progressive JPEG images usually contain multiple scans so you can look for a couple of “Start of Scan” matches (bytes: “0xFF, 0xDA”). The author used a simple Bash command to get accurate results:
>grep -c -P “xffxc2″ progressive1.jpg >1 >grep -c -P “xffxc2″ progressive2.jpg >1 >grep -c -P “xffxc2″ baseline1.jpg >0 >grep -c -P “xffxc2″ baseline2.jpg >0 >grep -c -P “xffxDA” progressive1.jpg >6 >grep -c -P “xffxDA” progressive2.jpg >12
The link also contains a number of other useful tools.
The plot thickens (thanks to user PussInBoots for alerting me to dig deeper). The question asked how to tell whether a JPEG was saved as Progressive.
"Saved as" appears to have a flexible meaning. I experimented and found that in some cases, saving as progressive meant only that the meta data parameter (Interlace) was changed, but the file was not actually altered to contain progressive scans. So the file contains a single image and the rendering software is told to treat it like a progressive image.
The way these "phony" progressive files manifest in the tests described above:
InageMagick: The Interlace parameter reads as "JPEG" rather than "None".
Photoshop: The only version of Photoshop I had readily available is ancient (version 7.0). In the Save for Web dialog, the
Progressivebox was pre-checked on these files, but not for standard JPEGs.
Browser: My system and Internet connection are too fast for this to be a useful test. Under normal conditions, everything is close enough to instantaneous to not be able to reliably differentiate any difference.
Identifying Bytes: This appears to be a more reliable indicator. The "phony" progressive JPEGs did not have either of the identifying byte patterns.
So to the original question, if any of the tests, above, indicate that the file is not a progressive JPEG, you can rely on the fact that it is not. However, the "simple methods", above, do not appear to reliably differentiate true progressive JPEGs from "phony" ones, so you can't rely on them to know if a JPEG is really progressive. In fact, PussInBoots reports in the comment that Photoshop CS6 appears to have a default choice as "progressive", so it's initial setting tells you nothing about the existing file.