HOME
TOPICS
ABOUT ME
MAIL

 
iPhoto retains JPEG picture quality even after 10 saves. Is Apple performing some magic?
 technofile
Al Fasoldt's reviews and commentaries, continuously available online since 1983

T e c h n o f i l e
iPhoto avoids JPEG losses using a method no other software employs


April 3, 2005


By Al Fasoldt
Copyright © 2005, Al Fasoldt
Copyright © 2005, The Post-Standard

   Newcomers to digital photography might be surprised to learn that there are only two ways to store the photos they take. One method damages the pictures; the other method keeps them safe from harm.
   The safe method is rare among consumers. It uses lossless file storage. Image formats using lossless methods include BMP and TIFF.
   The overwhelmingly common method, which harms image quality, is almost universal. You probably use it every time you take pictures. It's the image format known as JPEG ("jay-peg"), also spelled JPG.
   The JPEG dilemma is one of those small oddities of technological life. It's not a problem when you take pictures. JPEG gets in the way at a later stage.
   So don't let this get you down. Read this report carefully so you won't get unduly upset.
   Unless you have a fancy digital camera, you probably have no choice in the way your pictures are stored within the camera or in its attached memory card. Your photos are very likely to be JPEGs.
   That's OK. But later on, when you're fixing your photos, making them a little brighter or cropping out extraneous signs and all that kind of stuff, you run into the JPEG monster. It's an easy problem to understand.
   Basically, JPEG image formatting removes detail from a photo to trim the file size. It's good at fooling your eyes, and the first time it's done -- when the camera saves the original image, for example -- it can be very, very clever. That's OK.
   But, alas, when a JPEG image is changed, as happens when you crop the edges of the photo or change it in any other way, you end up with a major challenge to the JPEG formatting software. In nearly all cases, the photo software does a little more damage to the photo each time it's saved. After a few saves, the JPEG image starts to break down. It looks blocky and rough.
   All of us have seen pictures like that. For some of you, if you've done a lot of image editing, nearly all your pictures look that way.
   My traditional advice goes like this: The best way to avoid this is to stop using JPEG for images you care about. Once the picture comes out of the camera, save it in a non-destructive format such as TIFF, BMP or, as I explained last week, lossless JPEG2000.
   This is the accepted wisdom. No one could possibly argue with it. Right?
   Maybe not so right. In fact, I'm going to tell you that's it's not true, at least in some circumstances, using particular software.
   While testing image quality a few months ago, I discovered that my unshakeable approach to JPEG images was shakeable indeed. What shook it up was the latest version of iPhoto, the photo display and cataloging software for Apple computers.
   In every other program I've used, whether on Windows or Apple's OS X Macintosh computers, repeatedly saving JPEG images damages them incrementally with each file-save operation. But this wasn't true using iPhoto 5, the version of iPhoto that's distributed as part of the current iLife software suite.
   In iPhoto 5, image quality hardly changed at all. I saved a variety of JPEG originals a total of 10 times each, cropping the test images slightly each time to force a new file-save operation. There was almost no difference between the original digital JPEG photo and the 10th copy of the original JPEG.
   How can iPhoto 5 do this while all other software cannot? My suspicion is that Apple's software experts designed iPhoto 5 to do the only thing that can keep JPEGs from deteriorating. They apparently programmed iPhoto 5 to resave JPEGs using precisely the same image-compression routines (they vary widely in JPEG otherwise) that were used to create the image originally.
   This is a subject far too complicated to get into here -- books have been written about this single subject -- but I'm fairly certain that's what's happening.
   It's the only known way to resave a JPEG without altering the quality, and as far as I know hasn't been used before except in a few test programs. It's tricky for a program to figure out what JPEG methods were used in any particular photo, but it's not impossible.
Original image, left, vs. 10th consecutive saved version in iPhoto. Original image, left, vs. 10th consecutive saved version in iPhoto. The image was altered (by cropping very slightly) before each file-save operation to make sure it was saved completely. Click on the thumbnail view to see the actual screen shot. Warning: The screen shot is quite large, and you will have to scroll it to view the image if your screen resolution is less than 1600 by 1200.
   The accompanying screen shot shows a dramatic example of how iPhoto 5 maintains JPEG image quality. The photo at the left is a zoomed-in portion of an original JPEG image. On the right is the same part of the same image after 10 successive saves. The difference is very slight -- about the same as the difference I see in normal image software after a single JPEG file-save operation.
   This is good news for iPhoto 5 users. It's also evidence, however slight, of Apple's insistence on doing things differently when that kind of difference matters to consumers. You can see that in Macintosh computers and software, of course, but you'll also notice it in Apple's other products, such as the superbly designed iPods.
   Apple's iLife, which includes iPhoto 5, comes free with all new Apple computers, including the $499 Mac mini. If you have an older version of iPhoto, you can update it by purchasing iLife from www.apple.com/ilife.