How to tell a progressive JPEG

December 29th, 2016. Tagged: images

Using ImageMagick ($ brew install imagemagick) certainly helps. E.g.

$ identify -verbose baseline.jpg | grep Interlace
  Interlace: None
$ identify -verbose progressive.jpg | grep Interlace
  Interlace: JPEG

As you can see baseline.jpg is baseline, i.e. not progressive, while progressive.jpg is indeed progressive.

Newness

Apparently in newer IM (v7.0.3.8+) you should be able to tell without resorting to grep, like so

$ identify -format "%[interlace]" progressive.jpg

See https://www.imagemagick.org/script/escape.php

A quick reminder

You can use jpegtran (or MozJPEG) to convert to and fro the baseline/progressive.

In MozJPEG the -progressive option is default, so you need -baseline apparently (did not work for me with the brew install of MozJPEG). In jpegtran baseline is default, so you need to say -progressive, as in

$ jpegtran -progressive in.jpg > out.jpg

Tell your friends about this post on Facebook and Twitter

Sorry, comments disabled and hidden due to excessive spam.

Meanwhile, hit me up on twitter @stoyanstefanov