JPEG quality?
When I export a RAW file as a JPEG, I can enter a "quality" for the JPEG file, a number between 1 and 12. This seems to affect the file very little. What does this number refer to?
Apple Event: May 7th at 7 am PT
When I export a RAW file as a JPEG, I can enter a "quality" for the JPEG file, a number between 1 and 12. This seems to affect the file very little. What does this number refer to?
What does this number refer to
It is the accuracy of the compression. The JPEG compression is lossy. With a low "quality" setting the difference between the original and the compressed image will be greater than with a high quality setting. You will notice the difference, when you are looking at fine details and structures in the images.
Leonie, thank you for your response, but I am looking for some kind of quantitative answer to the meaning of those numbers.
There is none, the numbers are purely arbitrary, different programs will have different ranges.
The only thing you can say for sure is that the larger the number the less the compression on the image and the better the quality and the larger the output file size.
Thanks, Frank.
but I am looking for some kind of quantitative answer to the meaning of those numbers.
The problem with the numbers between 1 and 12 is, that they are just one value for the result of a sequence of different lossy and non-lossy compression algorithms, trading image quality for lower file size.
The parts in the processing chain are
It is hard to tell from a simple number between 1 and 12, what it exactly will mean for each part of this chain. I have never seen a documentation, how the JPEG codec is exactly implemented on MacOS X machines.
Leonie,
Thank you. It would have been helpful if Apple had put some descriptive words around those numbers in their Help documents. Fact is, when I saved a picture at various "quality" levels from 0 to 12, it was difficult to distinguish much difference in them when viewed on my new MB Pro with Retina display. This was true even when the pictures were magnified to almost the pixel level. And the level 0 file was much smaller than the 12 file. Perhaps it would matter more when printed. The original file was a RAW one from my Canon 60D camera.
I would like to hear from other people and their experience.
Thanks again.
Jpeg is an excellent compression algorithm. The magic of it is that when viewed even at very close detail it is very difficult to see any difference between a high and low quality jpeg.
Until you edit it.
Then, each time the jpeg is saved after editing some data is thrown away, so after a few edit/save cycles you will rapidly see a quite significant difference. That's what lossy compression means.
Apple are using Photoshop as a reference point for presenting this scale, and, frankly, they assume that users of a professional application might understand how jpeg works.
You'll see a big difference (in file size and quality) between 1 and 12. Try it.
If you want specifics, you can read the spec:
Thanks, Terence, that matches my experience.
Thanks, William, see Terence's reply above. I saw little difference between 0 and 12. None between 6 and 12.
Also keep in mind that not all images will give the same results at the same quality setting.
That is two images with file sizes of say 10mb when saved at the same quality setting will not produce files of the same size. Depending on the subject matter of the image the sizes of the JPG files can be very different. If one image has a large expanse of blue sky and the other has little sky and lots of foliage of varying shades the first will most likely produce a file size substantially smaller then the second.
So it's really a bit of a crap shoot. Choose a quality setting that gives you the file size that you need for whatever use you need always trying for the largest quality number you can get away with.
Edward1064 wrote:
Fact is, when I saved a picture at various "quality" levels from 0 to 12, it was difficult to distinguish much difference in them when viewed on my new MB Pro with Retina display. This was true even when the pictures were magnified to almost the pixel level. And the level 0 file was much smaller than the 12 file. Perhaps it would matter more when printed. The original file was a RAW one from my Canon 60D camera.
The Aperture JPG algorithm does an excellent job (and is in no way unique in this). JPG is highly-developed compression format. It is written to preserve detail. What's lost, is quality in large areas of smooth transition. JPG will make every attempt to retain detail. _If you keep the same pixel dimensions_, you won't see very much degradation in _details_.
From a 24 MB RAW (Sony) file 4,000 x 6,000 px, here is a 100% crop (taken with a 400mm lens, subject was c. 7m distant, RAW conversion by Aperture, no adjustments):
And here is the same 100% crop after saving the Image from Aperture to a JPG file, original size, Quality=2:
Note, first, the retention of detail. Note, second, the degradation (banding) of the smooth transitions in the background. Third, note that the dark part of the highest whisker, picture-right, is gone in the JPG.
Even at Q=2, the JPG file is 700 KB for a 24 MPix image.
Here are two 100% crops from an Image with detail throughout the frame (same camera type, same lens). First, as displayed by Aperture, and second from a same-pixel-dimensions JPG, saved at Q=2. Again, the subject was fairly distant.
This JPG file is close to 1 MB (also 24 MPix).
Again, we see that the details are only lightly softened, but there is significant posterization (pixel binning) wherever the forms get larger.
Now let's return the the first Image. Here is a different crop, this time from an area with little detail (above the squirrel)
And here is the same area, cropped from the Q=2 JPG file:
You can see where data has been discarded.
Finally, let's look at a sharp image with some creamy bokeh (do note that this is a 1,025 x 775 crop from the 4,000 x 6,000 original). Same camera, different lens, closer subject. Double-click to view at correct size. As recorded and converted:
And at same pixel dimensions, but JPG Q=2:
The full-size JPG file is c. 350 KB.
As a __rough__ conclusion, I'd say that:
- JPG works very well
- Quality setting isn't that important (and needs to be judged vs. file size)
- Downsampling (creating a file with smaller pixel dimensions) is likely to cause more degradation than reducing the JPG quality setting
- And of course, if you don't want to lose IQ, don't use JPG.
(Added a couple of left-out words.)
Thanks, Frank, all good advice.
Kirby,
Great demo, thanks for your excellent examples. I too like those Eastern Gray Squirrels.
Ed
Hi Ed,
You're welcome 🙂 .
The squirrels are fun to watch. We have squirrels in all our trees, in town, in a densely populated neighborhood of square blocks. In the parks we see black squirrels — that's what we call them. North of us they have black squirrels that have a truly luxurious black fur. And south of us they have Delmarva Ground Squirrels, which are huge. One fell out of a tree in front of me on day on the edge of a Maryland wood.
I take the pictures for my cat. She likes to watch.
JPEG quality?