Computer files—in particular, image files—can be saved in multiple ways. But do you know the difference between them and why you should use one file format over the other? Take, for example, the acronym for Graphics Interchange Format or GIF files. When should GIF files be used? And, for that matter, how is the format pronounced? (Here’s a hint, it sounds like a popular brand of peanut butter…)
Steve Wilhite was working for CompuServe in 1987 when he created the GIF format. And for the record, “The Oxford English Dictionary accepts both pronunciations,” the retired software engineer recently stated. “They are wrong. It is a soft ‘G,’ pronounced ‘jif.’ End of story.”
Wilhite had noticed that CompuServe (at that time the nation’s leading Internet provider) needed a practical way to deliver basic graphics on its Web page. Wilhite used his knowledge of data-compression methods to tinker with a new file format. After a month’s worth of work, Wilhite had made a prototype GIF, which showed a picture of an airplane.
Now back to how and why should you use one file format over the other…
GIF or Graphics Interchange Format (Est. 1987)
Background: GIFs offer file compression without a significant loss in visual quality. A GIF file can hold multiple images, which lets users create simple animations. GIFs were also one of the first two image formats used online. The format supports up to 8 bits per pixel and a palette of up to 256 distinct colors. Use GIFs for simpler images like logos with solid color areas. The format does not reproduce color photographs well.
Best Use: If you have an image of simple design that has big solid patches of color, a GIF handles that job well. GIFs are also supremely good at delivering simple animation sequences (like the world-famous “Dancing Baby”).
JPEG or Joint Photographic Experts Group (Est. 1992)
Background: Developed for photographers by photographers, JPEGs can be used to compress images at a 10:1 adjustable ratio with little loss in picture quality. The JPEG format is the most commonly used format for digital cameras and the Web.
However, some graphics don’t work well as JPEGs, especially line drawings that have sharply contrasting tones. Also, because JPEG is a lossy compression method, you should find another format for ultra-precise work where the exact original image must be captured perfectly and completely. Finally, if you’re working with an image that will be edited several times, you should probably select another format.
Best Use: Photos or photo-realistic paintings. Ideal for Web use because of the small file size.
PNG or Portable Network Graphics. (Est. 1996)
Background: Born out of a backlash against the patented GIF format, the PNG format was developed to replace GIFs. A loose association of computer-graphics users came together as the PNG Working Group and developed the PNG format.
Best Use: PNG relies upon a lossless data compression method (called DEFLATE), which makes it an ideal format for preserving an original image with complete visual accuracy. And PNG has it all over GIF where color is concerned; GIF only offers 8-bit indexed color, while PNG features 24-bit (8 bits per channel) and 48-bits (16 bits per channel) truecolor.
The PNG format is a good format and superior to GIF in many ways—and great for web development, but you can’t make an animation out of a single file, like you can with a GIF. As for PNG versus JPEGs, it’s a good rule of thumb to use JPEGs for pictures, but PNGs if you have visuals containing text, line art or other graphics.
Searching for the Right File
The GIF file has changed computing, carving out a unique identity as an all-purpose, low-data utility file. The file and its creator have been honored with a Lifetime Achievement award by the Webby Awards. The awards’ executive director called the GIF, “an incredibly enduring piece of technology,” and the format continues to thrive. All it took was a programmer who was a master at developing advanced programming skills.