How to determine what quality a JPG was saved as?


When saving JPG images with Pixelmator or Photoshop, I select a quality from the scale 1–100 that gives optimum file-size.

Later on, I sometimes take these images and crop them a little more (not always possible to find the originals), but when re-saving I can no longer know what quality I saved them with.*

Are there any Mac programs that will reveal the quality that the JPG was saved at?

* Perhaps this is not the right way of going about it, because it seems that, for example, if I'm already saving a file that was saved lossy at 59 quality previously, and then go ahead and I save it again (even at 59 or 99), it will loose even more quality? Correct?

4/3/2013 9:18:00 AM

Accepted Answer

Yes! You can do this from command line (using the Terminal app) with ImageMagick.

After you install ImageMagick, navigate to the directory where your picture is located and run the following command:

identify -verbose yourimage.jpg | grep -i quality

Where yourimage.jpg is the name of the image.

And you should get the value which indicates the image quality. 0 means the lowest quality and 100 means the highest.

How to install ImageMagick on a Mac

3/7/2018 3:52:00 PM

When saving images as .jpeg you always lose information. The dialog basically asks you how much information you would like to lose in favor of smaller size on disk (1 = most loss, 100 = least loss). There is no way to tell what you originally selected and the only use would be to have a history of your workflow because this loss is irrecoverably applied to the image when saving.

Your assumption is right; every time you open the compressed image and save it again (with anything else but setting the quality value to 100) you will lose more information.

Because of this I would encourage you to archive all the original pictures in full size and a lossless format.