Looking under the graphical hood

Graphics are simultaneously the best and worst that the World Wide Web has to offer. Humans relate to graphical images, which is why newspapers and magazines print more than just plain text. It's why television is so popular. So a Web site with outstanding graphics should attract more users, right?

Yes, but only if the graphics don't get in the way.

The problem with graphics is that they're big. A Web site that has a 2000-word article will consume about 10,000 bytes (assuming words are an average of 5 characters). That 2000-word page will download in about 3 seconds for users with 28.8K modems. That's fast, but without graphics, it will be boring.

Graphics make a Web site more interesting, but they complicate the download process. A single picture may not be worth 1000 words, but it can consume as much space as 1000 or more. Perhaps a lot more. A full-color 300x600-pixel image (uncompressed) is nearly 1,500,000 bytes, or the equivalent of about 300,000 words!

Thankfully, some smart folks have figured out how to make images smaller -- either with JPEG compression (which throws away some of the image, resulting in an overall fuzziness, but retains colors) or with GIF compression (which throws away colors but retains clear-cut edges).

This is good?

If you have a graphic that contains text, you can get away with losing some colors as long as you keep good contrast between the text and the background. And if you have a photographic image, you can get away with the introduction of some fuzziness if you retain all the colors. The human eye does a good job of filling in the blanks.

The human eye doesn't like color degradation with photographic images, though because this often shows up as "banding" -- clearly defined bands of colors. And the eye doesn't tolerate much fuzziness when it comes to viewing text.

For that reason, conventional wisdom says that it's better to use GIF compression with images that contain text and JPG compression with images that are photographic. GIF images also offer the ability to create transparency for images that aren't exactly rectangular. That, however, is a topic for another time.

If transparency isn't an issue, the choice between GIF and JPG should be based solely on which will produce the better result for this particular image.

In mid-May, I learned about a new program from Great Britain -- one that promises to allow the (usually smaller) JPG format to be used with more images. Even with images containing text. My tests suggest that this is, in fact, true!

I conducted an experiment with an image that contains an artistic image and some text. Some browser programs aren't able to display TIFF images, so I can't show you to the TIFF on this page. TIFFs are clear and precise, but they're also large. TIFFs are often the starting point from which GIFs and JPGs are made, though. To get a better idea what I started with, you may want to download the original TIFF. You can do that by selecting this link. The file is 177,000 bytes.

If you download the file, you'll see that the text at the left is sharp. So is the image (from Play's Amorphium program) at the right. Now let's take a look at this image in GIF and JPG formats.

Enter the JPEG Optimizer

Most Web site designers would choose GIF for this image because of the text.

This image is 13,000 bytes.

A high-quality JPG image retains most of the text quality.

The problem with high-quality JPG files, though is that they're large. This file is 26,000 bytes.

A lower-quality JPG still retains the apparent quality of the guy with the cigar, but now the text is fuzzy.

This image is still 12,000 bytes, not much smaller than the superior GIF image.

The image from the JPEG Optimizer program retains nearly the same text quality as the 26,000-byte JPG file and the guy with the cigar is sharp.

The file size, though, is now just 9,000 bytes!

The ability to save 25% of a file's size with virtually no image degradation is exciting! If you're developing your own Web site, you'll want to take a look at http://www.xat.com/ for information about the JPEG Optimizer.

   
 
 

William Blinn Communications - All Rights Reserved
Subscribe to the Newsletter
179 Caren Avenue • Worthington, Ohio 43085
Phone: 614-785-9359
(Telemarketers please note: This number is listed on the national Do Not Call registry.)