Page 1 of 1

Better way to get JPG quality than Identify -Verbose?

Posted: 2019-02-20T06:34:02-07:00
by Tom2112
Hello Everyone,

I'm working with a large image library, approx. 1.7 million images. They are almost entirely in jpeg format, though the quality settings used to save them vary. I know I can check (or estimate) the quality setting of a jpg file by using image magick with the identify and -verbose switches. That gives me way more information than I need. Is there a way to just get the quality numbers?

I'm planning to write a script to go through the images and mogrify the images that have a quality higher than 85 down to 85. This should save me a large amount of storage space without sacrificing much in noticeable quality.

Thanks in advance,
Tom

BTW, I'm using the latest version of image magick (v7.0.8-28 Q16) on Windows 10. And the command I was using to get the quality numbers was 'magick identify -verbose myfile.jpg'

Re: Identify -Verbose Options?

Posted: 2019-02-20T07:19:02-07:00
by Tom2112
I think I found an answer. So I'll post it for anyone trying to do something similar.

magick identify -format %Q myfile.jpg

will return just the quality number, and it is much faster than trying something with -verbose and attempting to pull the quality number out of the pipe.