On MovieTome: See the newest WATCHMEN trailer!

Web image format: GIF

Tags: Guest Contributor

  • Save
  • Print
  • Recommend
  • 1

Takeaway: When you're working with Web image formats, find out if the Graphics Interchange Format (GIF) is best for you.

By Paul Anderson

CompuServe's Graphics Interchange Format (GIF) compresses images in two ways. First, it uses something called Lempel-Ziv encoding, which counts rows of like-colored pixels as a single unit. Second, it limits itself to indexed color. This means that a GIF can have no more than 256 colors, so you may have to reduce the colors in your images to use it. That's why GIF doesn't work well for photographic or high-color images.

GIFs with sufficiently few colors realize greater compression: 128 or fewer colors are referenced with 7-bit data; 64 or less with 6-bit data; and so on, down to a 1-bit, two-color GIF. This makes GIF an optimal format for simple line art, and that means there are limits and rewards to adding or removing colors. GIF has a few unique features. A GIF file can contain several images, along with a duration value for each one, to produce animation. It also has limited transparency: one color in an image's palette can be designated as transparent. This is an either/or arrangement; pixels with colors close to the transparent one will not be partially transparent.

Both of these images are less than 2.42K

GIF (2,440 bytes) JPEG (2,469 bytes)

Paul Anderson is associate technical editor for CNET Builder.com. His responsibilities don't include handling graphics, so naturally, he handles them all the time.

  • Save
  • Print
  • Recommend
  • 1

What do you think?

Article Categories

Security
Security Solutions, IT Locksmith
Networking and Communications
E-mail Administration NetNote, Cisco Routers and Switches
CIO and IT Management
Project Management, CIO Issues, Strategies that Scale
Desktops, Laptops & OS
Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
Data Management
Oracle, SQL Server
Servers
Windows NT, Linux NetNote, Windows Server 2003
Career Development
Geek Trivia
Software/Web Development
Web Development Zone, Visual Basic, .NET

Mobile Computing

advertisement
Click Here