Explore BrainMass

Internet Browsers Rendering GIF and JPEG Images

Describe the GIF and JPEG file types. How are they different, and how does the size of the file relate to the speed of its presentation in the browser?

Solution Preview

The majority of web pages today contain embedded in them many kinds of images. The graphic images are of two types.

1. Simple images - which are just embedded on the pages for display or decoration purposes.
2. Clickable imagemaps - which are actually picture icons representing thumbnail sketches.

There are very many formats for storing digital data corresponding to graphic images with their related advantages and disadvantages. Most web browsers (exclusind text-only ones like Lynx, Mosiac) can display only a handful of these formats inline. The format of about 90% of these files is binary. The five most universally accepted formats for 2-D graphics are:

1. Graphical interchange format - GIF (GIF87 and GIF89A)
2. Joint Photographic Experts Group - JPEG
3. X-Bitmap/X-Pixelmap
4. Portable Network Graphics - PNG

a. GIF is the most widely used raster graphics file format on the web. It was develped by Compuserve and stores images in a compressed format. All browsers can display GIF inline.

GIF Color encoding format
GIF files are represented by a maximum of only 256 colors(8-bit color). Hence, the graphic can be black and white, grey scale, or color images. A GIF image is first analyzed by an image analysis algorithm to determine the set of 256(8-bit color) or lesser colors that best describe the colors in the image. It next creates a color table where each pixel color is mapped to a number in the range 0-255, representing a color in the table, closest to the actual color. The resulting GIF image consists of an array of these color indices plus a color map with the desired mappings.

GIF file compression ...

Solution Summary

This solution of 1,070 words defines GIF and JPEG image file types and looks at the differences between them. It also explains how the size of the file relates to the speed of its presentation in the internet browser.