Talk about a success story--the JPEG file format seemingly came out of nowhere about a decade ago, and now JPEG (with its .jpg file extension) is the single most common digital image file format on the planet. JPEG is used by most digital cameras and scanners, and it's the common language of picture sharing between friends, family, and coworkers. PCs use JPEG. Macs use JPEG. It's simply ubiquitous.
But it wasn't always this way. Before 1995, every image editor, paint program, imaging device, and operating system had its own preferred file format. I routinely juggled PCX, TIFF, TGA, GIF, and bitmap files, and I owned software designed--believe it or not--to do nothing other than translate images from one format to another!
Though JPEG is nearly universal, many people just don't know how to get the most out of the format. This week, I thought we'd dive into all the useful things you may not know about JPEG.
First and foremost, JPEG images are "lossy." In other words, digital images saved in JPEG format are compressed to save space--and compressed so that some information is lost along with some image quality. The JPEG format exploits subtle but important limitations in human vision: We have trouble accurately perceiving small changes in color between objects that are in close proximity. Consequently, the JPEG algorithm is designed to discard small amounts of color information between adjacent pixels on the assumption that we won't be able to perceive what was lost anyway.
The system works pretty well. Consider a 900-by-975-pixel image of a bee. The original version, saved in the TIFF file format, is just shy of 2MB. Saved as a JPEG, it takes up a mere 500KB, a quarter of the original size. If you could look at the TIFF along with the JPEG, would you be able to see the difference? Possibly, but you'd have to look very hard to find it.
That's good, but we can do a lot better. The picture is 500KB because I always save my JPEGs at the very highest quality level I can get--which is, not surprisingly, the lowest compression level. The great thing about the JPEG format is that you can vary the compression level to suit your needs. If saving disk space or making a small file for tasks like e-mail transmission or posting on your Web site is more important to you than image quality, use more compression. For example, I tried a compression level of 50 percent on the bee image.
If you want to compare the two versions, try loading both at once in two different browser windows and then use
If you're curious about how to find the image compression control, fear not--it's usually an option when you save an image file. Choose
In reality, though, the 50-percent-compression picture is too compressed: It lost its photo-realism. My advice? The sweet spot in image compression is usually about 10 percent.
The 10-percent-compression bee looks pretty much the same as the first bee (try the
Your digital camera doesn't have a numerical quality setting, however. Instead, it probably just has a choice of three quality levels, usually indicated by adjectives like best, good, and normal. You should always use the best setting your camera offers, because it produces your "digital negative," and you want the highest quality you can get to begin with.
That said, it gets just a little more complicated when you edit your pictures. (Ever notice how everything is always just a little more complicated than you first expect?)
In a nutshell, you should avoid recompressing your image files. Suppose you take a picture and load it into your image editor. Since it started as a JPEG in your digital camera, it has already been slightly compressed (depending upon your camera's image quality setting). If you make changes to the picture and save it again as a JPEG, you're compressing it even more and discarding additional color information. If you do that frequently enough, the changes will become obvious--like the badly compressed bee image.
How can you avoid this? One method is to save your edited photos in a lossless format like TIFF. When you use the TIFF format, you "lock in" the image's current level of quality without doing any further damage. An alternative is to save your changed photo in JPEG format with the compression level set to the bare minimum; if you do that, any loss in image quality probably won't be visible to the naked eye. Just be sure you repeat the process over and over. And remember that just opening, viewing, copying, or moving JPEGs doesn't degrade them. It's only when you make changes and save again does the potential for damage occur.
Dave's Favorites: Get Your Questions Answered at the Digital Photo FAQI love Frequently Asked Question pages, or FAQs. Sometimes I find myself reading good ones that I encounter on the Web even if I'm not really all that interested in the topic in question. When I discovered the Digital Photography FAQ, compiled by Duke University's Ronald Parr, I felt tingles of excitement. Not only is it extensive, but it also seems to be up to date and accurate.
This FAQ is divided into categories like General Photography, Digital Photography, Color, Editing, and Printing. Ronald covers all the big questions--stuff like how long will prints last, how to share pictures on the Internet, and how to use histograms for image editing. The list is chock full of excellent links; for example, the question on photo sharing sites takes you to a wonderful Web page that helps you decide which photo sharing site to use.
Q&A: Avoiding Glare When Photographing GlassYou recently wrote about using the perspective correction tool on buildings. I use that same tool to solve the problem of shooting a painting or other item that is mounted under glass. I shoot the object at about a 30 degree angle to reflect the flash away from me and to keep it from bouncing back into the lens. Then I use the perspective tool to straighten the picture sides back to parallel with each other. This works perfectly, with no flare on the glass.
That's an excellent suggestion, Ric. Shooting glass and other shiny objects at an angle is a handy way to prevent glare and flashback. For more on this topic, check out "Shoot Products for EBay," which includes a step-by-step explanation of the technique.
Just remember that this sort of transformation may introduce a bit of distortion into your picture.
Hot PicsGet published, get famous! Each week, we select our favorite reader-submitted photo based on creativity, originality, and technique. Every month, the best of the weekly winners gets a prize valued at between $15 and $50.
Here's how to enter: Send us your photograph in JPEG format, at a resolution no higher than 640 by 480 pixels. Entries at higher resolutions will be immediately disqualified. If necessary, use an image editing program to reduce the file size of your image before e-mailing it to us. Include the title of your photo along with a short description and how you photographed it. Don't forget to send your name, e-mail address, and postal address. Before entering, please read the full description of the contest rules and regulations.
Albert used a Canon S110 to take his picture. He writes: "A neighbor was feeding shore birds one morning. I was taken by how patiently the birds waited to be fed, and I was lucky to capture a moment when a new one flew in to join the group."
Congratulations to David and to everyone who won a Hot Pic of the Week last month. Keep those entries coming!
Dave Johnson