7

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?

6

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

  • Hey giogziro, welcome to GDSE and thanks for your answer. If you have any questions, please see the help center or ping one of us in the Graphic Design Chat once your reputation is sufficient (20). Keep contributing and enjoy the site! – Zach Saucier May 25 '15 at 0:28
  • One issue I've just come across in Pixelmator that I think is worth noting here - the quality value that you save the image with in Pixelmator doe not correspond to the actual JPEG quality, i.e. an image saved at 85% quality in PM actually has a JPEG quality of 95. – DisgruntledGoat Sep 21 '15 at 16:48
8

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.

2

You can not tell the exact settings which you applied on a jpg. As DA01 said there is no memory of that... but there is the fingerprint.

There are programs that analyze the chunks of data to estimate the compression.

There is one program I know but it is not for mac.

http://www.mediachance.com/digicam/jpgq.htm

On that same page, it is a good explanation on re-compression.

Some other programs (like gimp) have an option to try to guess the compression (analyzing this fingerprints) and use the same settings.

But you should try to have a workflow to minimize the need for this re-compression.

1) Save your original files in a safe place.

2) Use a lossless compression format in the process, like PSD.

3) You can use jpg again on the output, but if you need to make some changes, go back to your psd files. Jpg should be only a final output file format.


I must add that there is not just one algorithm to compress JPG images, but several subsampling methods and this give different quality-compression ratios. This program gives you a glimpse of two.

Also, different programs use different "scales" so you probably need to reinterpret the data.

-2

In your specific situation (cropping jpegs you don't have originals of) there are specialized tools to crop jpeg files without recompressing them. See this question: How to crop a JPG without recompressing?

Taken from http://jpegclub.org/losslessapps.html, here is a list of Mac programs that can do lossless jpeg edits:

  • PhotoLine [Computerinsel] (Windows, macOS) - Image processing for Windows and macOS, supports JPEG 9
  • exifiron [Marko Mäkelä] (Windows, Macintosh, C/POSIX) - Orientation correction and optimization of EXIF JPEG images, includes Exif patch
  • Cameraid [Juri Munkki] (Macintosh) - Digital photography utility package
  • GraphicConverter [Lemke Software] (Macintosh) - Shareware graphic converter
  • ACDSee [ACD Systems] (Windows, Macintosh) - Picture viewer and digital imaging software
  • Shutterfly [Shutterfly, Inc.] (Windows, Macintosh) - Online photo album uploader software
  • MaPiVi [Martin Herrmann] (Linux, Unix/X11, Macintosh, Windows, Perl/Tk) - Martin's Picture Viewer and Organizer
  • Photo Viewer [PhotoParade] (Windows, Macintosh) - Digital photo viewing and managing
  • 2
    Please consider expanding on your answer rather than just linking out to other posts and sites. – Ovaryraptor Mar 5 '18 at 16:41
  • The answer provides important information (the fact that lossless editing is possible) which the poster apparently never heard of. The answer is clearly helpful even if I hadn't expanded it. Why should I bother helping such a hostile community? – DBN Jul 31 '18 at 5:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.