advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 3.6/5 | Rate this item | 16 users have rated this item.
Reference Guide: Graphics Technical Options and Decisions (cont'd)
GIF Format
GIF is the format of choice for line art.

GIF pronounced with either a hard or soft g—jif or gif—stands for Graphics Interchange Format. The GIF file format uses lossless compression to keep file sizes as small as possible.

advertisement

GIF is the right format for images that are composed primarily of lines and solid blocks of color. Its compression scheme condenses repeated bits of the same color down to a single instruction that says, for example, "82 orange bits."

A GIF image's color palette is limited to a maximum of 256 colors. Use the GIF format for indexed images of 256 or fewer colors. The graphic must already be indexed with a color resolution of 8 bits or less to save it as a GIF.

Avoid using the GIF format for images with complex, subtle gradations of color. For these images, use JPEG instead.

flame.gif 3K These two images are perfect candidates to be saved as GIF files. They have a limited palette of colors, and the colors are mostly in solid blocks with clear edges. gif.gif 1K
 
GIF didn't do a very good job with this photograph. The dithering (dots) are GIF's attempt to reproduce the photo's original, subtle color gradations using GIF's 256-color palette. JPEG is the right choice for this image; it would look better and the file would be smaller.
glacier.gif 5K

The GIF file format also provides us with a couple of very useful features -- transparency and animation -- neither of which are supported by the JPEG format. PNG has transparency features, but does not support animation.

Transparency
When saving an image in the GIF file format, you can choose one (and only one!) color to be transparent. A transparent color is like a piece of clear glass; it is invisible and allows whatever is displayed "beneath" it to show through. Thus the GIF transparency feature enables you to create irregularly shaped images with the background showing through.

Transparent GIF Transparent GIF Transparent GIF
Transparent GIF Transparent GIF Transparent GIF
Transparent GIF Transparent GIF Transparent GIF
The images on the left are all the same transparent GIF, repeated nine times in a table, with each table cell set to a different background color. The transparency allows the color backgrounds to show through.

regular GIF

Here's the GIF image without any transparency effect. See how the non-transparent white blocks the brown background from showing through?

When you export a file as a GIF from your graphics program, transparency type is one of the options.

Animation
Without requiring your viewers to have any special browser plugin, the GIF format enables you to create and display animated images on your web page.

twirling star This animated gif is made of a series of frames. The ability to animate is part of the GIF89a standard.
Previous Page: Introduction Next Page: JPEG and PNG Format
Page 1: IntroductionPage 7: Bit Depth, Color Depth
Page 2: GIF FormatPage 8: Indexed Images, Palettes, and Dithering
Page 3: JPEG and PNG FormatPage 9: Anti-aliasing
Page 4: Bitmapped vs. Vector-based and Bitmapped ImagesPage 10: Compression and Lossy Compression
Page 5: Vector-based ImagesPage 11: Lossless Compression
Page 6: Image ResolutionPage 12: Thumbnails
Please rate this item (5=best)
 1  2  3  4  5
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Help  |   Site Map  |   Network Map  |   About


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers