Articles – Free Online Articles on Health, Science, Education
Google
 
 

What is the difference between gifs and jpegs and when to use which one

Learn the difference between two widely-used image compression formats, GIF and JPEG, and when to use them.

Sponsored Links

 

One of the most widely used features of the World Wide Web is the display of pictures and other graphics. Graphics can bring a difficult technical subject to life by illustrating ideas that can are hard to convey in words. Companies that have Web sites use graphics to display their logos and products. And one of the most-loved features of graphics on the Internet is the ability to send pictures to friends and loved ones. There are many ways in which images can be stored on the Internet, and each has its advantages and disadvantages.

While images on the Web could be “uncompressed”—that is, in their original, full-size format—the time needed to transfer such images would be unreasonable for most computer users, especially those using dialup modems. For this reason, Net graphics are usually compressed to help speed the transfer, as well as save space. The two most popular image compression formats used on the Internet are GIF and JPEG. Just like screwdrivers or power tools, each type has its own special use. Knowing where to use each will help you create the best possible graphic for the job.

First let’s look at GIF, short for Graphics Interchange Format. This format was the most popular in the early days of the World Wide Web, and it is still widely used. The compression scheme used in GIF (called LZW) is lossless, which means file size is reduced without harming the quality of the image. LZW works by noting redundant areas of images, removing them, and then reinserting them when it is time for the graphic to be displayed. This allows for a smaller storage size and transfer time.

There are some limitations to GIF, however. One of its most important is that images compressed with GIF are limited to 256 colors maximum. Today’s computers can display millions of colors, so GIF images are not well suited for full color photographs. An ideal application of GIF compression is logos or line art: images that have large areas of the same color. Since the compression is lossless, GIF images preserve the “sharp edges” in color that are often used in logos and other icons.

GIF images can also be transparent, a feature that is widely used on the World Wide Web. Using an image editing application, a user can set a particular color to be transparent. When this image is placed on a Web page, the transparent area will appear the same color as the page background.

Another feature of GIF images is the ability to create animations. There is no compression between frames of animation, however, so this is not a terribly efficient method of displaying animation.

JPEG compression, short for Joint Picture Experts Group, is best for pictures or photographs. Unlike GIF, JPEG has full support for the millions of colors your computer is capable of. When there are many colors in an image, JPEG usually beats out GIF in image compression. There are some drawbacks to JPEG, though. Most importantly, JPEG is lossy. Every time a JPEG is saved, some data is lost, never to return. Because of this, JPEG images do not display sharp transitions well—splotchy blocks of color known as “artifacts” often appear when an image with sharp lines is saved as a JPEG.

JPEG has the ability to be saved at different compression levels. A higher compression will reduce the file size at the expense of image quality. A lower compression will keep more data and produce a higher quality image but will increase the file size.

A final consideration when using JPEG compression is image rotation. Some software is able to rotate JPEG images without loss. Most software, however, will degrade the image quality when rotation occurs. This is an important fact to bear in mind when working with JPEG images.

In conclusion, let’s review the strengths and weaknesses of JPEG and GIF graphics.

GIF: Good for line art, sharp transitions, less than 256 colors.

JPEG: Good for pictures, photographs, smooth transitions, millions of colors.



© 2002 Pagewise


You are here: Essortment Home >> Science & Technology >> Computers:General >> What is the difference between gifs and jpegs and when to use which one 

<<What is adobe acrobat and what does it do? How to burn a cd>>