How Web Image Formats Work
Module D23c

Wherever you see this separator line in the document,
clicking on it will return you to the Contents.

Overview
Two kinds of images are widely used on the Web, and are likely
to remain popular for many years:
GIF
- Name means: Graphic Image Format
- Developed by: CompuServe
- Made available in: 1987
- Type of compression: Potentially lossy + Lossless (LZW)
- Best used for: Diagrams, typography, simple color representations
JPEG
- Name means: Joint Photographic Experts Group
- Developed by: Joint Photographic Experts Group members
- Made available in: 1991
- Type of compression: Lossy + Lossless (Huffman)
- Best used for: Photographs, complex color shading

GIF Images
GIF images are produced by putting bitmap images through a six-step
process:
1. Color listing
2. Sort by frequnecy
3. Apply color limit
4. Adust non-represented colors
5. Represent pixels by frequency
6. Apply LZW (lossless compression)

JPEG Images
This is the process by which bitmap images are converted to JPEG
format:
1. Divide image into squares 8 x 8 pixels on a side (64 pixels
total)
2. Apply Discrete Cosine Transformation (DCT), a lossy compression
technique
3. Quantize the result to find the most frequent colors
4. Throw away redundant colors according to the degree of compression
required
5. Apply Huffman coding (lossless compression)
Audience:
This is for people who know in general how computer graphics
work, and want to know more about Web image formats.
Objectives
When you successfully complete this lesson, you will be able to...
- Discuss the general process by which an image is rendered as a GIF
- Discuss the general process by which an image is rendered as a JPEG
About this document...
Module D23c: How Web Image Formats Work
This document is part of a modular instruction series in Computer Information
Systems. For more information, see the overview
or the list of modules in this series, D: Desktop Publishing
and Computer Graphics. This document has been used in the following classes:
INP 152
- Author:
- Laurence J. Krieg
- Institution:
- Department of Computer
Information Systems, Washtenaw Community
College
- History:
- Original: September 2001
- This version posted: [an error occurred while processing this directive]
- Copyright:
- Copyright © 2001, Laurence J. Krieg.
Instructors: You may point to this file in your Web-based materials.
Students: you may make a copy for your personal use.
All other uses: contact the author, Laurence
J. Krieg for permission.