Keep your compressed graphics from becoming junkers

Very seldom do I read an article on the Web and say to myself, "Wow! I've been wondering how that works since I learned how to make prank phone calls when I was 4 years old!"

But I did learn something today: the art of compressing Internet graphics and photos. Most Web designers want their pages to both have graphics and load fast. By compressing your images, you can achieve a common ground between electrifying graphics and a multitude of content. (Note to readers: I'm trying out for a part-time used-car salesman's job, so if you notice random adjectives in this column, please ignore them and continue reading this WITH NO MONEY DOWN!)

There are two major types of compression -- Graphics Interchange Format (GIF) or Joint Photographic Experts Group (JPEG). There are reasons to use one or the other, but you must first determine what wonderful image or amazing photo you plan to use, and whether or not you need a sunroof.

GIFs do not lose any information when being compressed, rather they take on slightly different code once they are compressed, according to a Web designers page based in the UK. I urge you to check out this page, but don't be fooled by the word "colours," it's just the Englishman in them. Poppycock! Anyway, the compression method finds similar parts to the graphic and simplifies the code so that the file will be much smaller. The best time to use GIF compression would be if there were a limited number of fascinating colours in your bloody 4-wheel drive graphic. The more pieces that are the same, the more your file will compress.

JPEG compression works a little different and is used more frequently for photos. The compression turns the photo into a set of curves, big and small, and actually discards some of the information. Assuming you want to keep the majority of your quality, the smaller curves are the ones to go first.

If you want to take a test drive and you have a graphics program, probably Photoshop, just test out the different levels of compression and see how far you can go to make your files compact. Webreference's Optimizing Web Graphics page gives you ideas on excellent programs to use for having more fun compressing than originally thought possible, along with a passenger's side airbag.

There's always a catch, though, and this time, it's not ludicrous payment plans. For the past couple of years, a company called Unisys has been claiming patent rights on GIF-turning programs and expects royalties. If you must know more about the patent fight, or if you like fire, visit Burn All GIFs for a somewhat neutral, thought-provoking take on the ordeal. Or you could just do what we do and not worry about it.

There are other alternatives as well. The biggest challenger to the GIF is Printable Network Graphics, which is only six years old. According to its Web site, PNGs are more practical than GIFs for three reasons: alpha channels (variable transparency), gamma correction (cross-platform control of image brightness) and two-dimensional interlacing (a method of progressive display). More importantly, resaving an image (which in turn recompresses it) will not result in more lost data. So all of your stunning colours will remain.

You probably didn't get as much out of this as I did, yet I do believe this kept you from making prank phone calls for a good 10 minutes. By remembering the advantages of GIFs, JPEGs and the new PNGs, you will be able to design a remarkable Web site that conserves incredibly on load time. Just compress a graphic and sign on the dotted line, and you can drive one home today.