ExifTool Forum

ExifTool => Newbies => Topic started by: Mark.Ambrose on October 12, 2018, 05:04:18 AM

Title: Detecting Progressive JPG files
Post by: Mark.Ambrose on October 12, 2018, 05:04:18 AM
Hi All ,

my first post , hopefully I am not breaking any forum rules . Thanks for those that reply ... and thanks to the developer of this great library  .

I've been playing with Exiftool for 2 days now , trying to detect files that are Progressive JPG's . From the output it seems there are 2 different ( and possibly more) ways I can see its progressive .

Encoding Process                : Progressive DCT, Huffman coding
Photoshop Format               : Progressive

so my command line to detect both were

exiftool -if "$EncodingProcess eq 'Progressive DCT, Huffman coding'"  -T -p "$filename"  -execute  -if "$Photoshopformat eq 'Progressive'" -T -p "$filename" -common_args  ./*.jpg

which works , but I can get duplicates if there are two tags with the specified values . There also may be other apps that have different tags as well as different values . Is there a way to check only TAG values for anything *Progressive* in the values , and return the filename .

exiftool  '-*progressive*' -T -p "Progressive  -  $filename"  ./*.jpg  ( returns all files)

All I need to do is reply with  Progressive : $filename in the output .

I know it must be easy , but have been wrecking my brain trying to use a wildcard for only the value

Many Thanks
Mark







Title: Re: Detecting Progressive JPG files
Post by: Phil Harvey on October 12, 2018, 07:17:12 AM
Hi Mark,

Just a couple of points:

1. -T and -p are mutually exclusive options.

2. Instead of ./*.jpg, it is better to use . -ext jpg (see common mistake #2 (https://exiftool.org/mistakes.html#M2))

Is it only "Progressive DCT, Huffman coding" that you are interested in?  What about "Progressive DCT, arithmetic coding", or "Progressive DCT, differential Huffman coding"?

I would probably do this:

exiftool -p "$filename" -if "$EncodingProcess =~ /Progressive/ or $Photoshopformat =~ /Progressive/" -ext jpg .

To catch any values which contain the word "Progressive".

- Phil
Title: Re: Detecting Progressive JPG files
Post by: Mark.Ambrose on October 12, 2018, 07:48:46 AM
Thanks so much Phil .

I've been going through the common mistakes , and well , I made quite a few  :)

Its not just one or two types of Progressive , but all types . I was trying to figure out a way to catch anything *Progressive* as per what you said .

Works Perfect  !!! you make it look so easy .

Thanks so much for the reply . Definitely a tool I'll be using again .

Mark