Results 1 to 10 of 19

Thread: Image Export Formats

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3

    Post Raster Images: Graphic Interchange Format (GIF)

    In the early days of the Web, Compuserve's GIF format was everywhere. The GIF added three important things to imaging: compression, transparency, and animation.

    Unlike the bitmap, GIF uses a compression scheme to reduce file sizes. GIF uses a lossless compression algorithm called Lempel-Ziv Welch (LZW), which looks for repeating horizontal patterns and stores each pattern only once. Every time the pattern is encountered in the image, it is replaced with a code that represents the longer pattern. In this way, GIFs compress by removing horizontal redundancy. GIF's compression is lossless, meaning that no information is discarded during the compression process, so the image will not lose quality if it is resaved.

    GIF's second advantage over the bitmap is its ability to handle transparency. A GIF can have one color designated as transparent, allowing non-square images, and images with holes that let a background show through. However, since only one color can be made transparent, it is impossible to achieve anti-aliasing between a transparent graphic and the background it is placed on. Slanted lines or curves will show very obvious jagged edges.

    The third thing GIF added was simple animation. A GIF can be built with several frames, and it will cycle through them endlessly to allow for very rudimentary motion graphics. Unfortunately, the LZW algorithm is not applied across the frames, so even though two frames may be similar, they are not compressed together. A ten-frame animation will be roughly 10 times larger than a single frame still.

    All is not roses, though. GIF's maximum color depth is only 8 bits, so an image can have a maximum of 256 colors. Although that may seem like quite a lot, many colors are used to soften the jagged edges that appear on arcs and slanted lines. This anti-aliasing process can use far more colors than are allowed by the GIF format.

    GIF is best used for images that have wide areas of solid color and simple geometric shapes. "Cartoony" images and text benefit the most from GIF compression. Text banners for web pages are often saved as GIFs because they allow a designer to use an unusual font, but they remain small enough to not add too much download time. Photographs and textured illustrations will receive almost no benefit from being saved as GIFs versus bitmaps. Also, the small color palette available with GIF means that a photograph will often lose quite a lot of color information, resulting in either ugly banding artifacts or very visible dithering.
    Last edited by Midgardsormr; 06-20-2011 at 06:48 PM.
    Bryan Ray, visual effects artist
    http://www.bryanray.name

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •