Why are there all thes different formats?There are several reasons for the plethora of image formats that are now in use. When image for
mats are designed, there are several considerations. One consideration is the ease of reading, manipulating, and writing the data from a file. Another is the actual size of the file. Because of these considerations, many formats, such as the very popular
GIF and JPEG formats, are in standard use today. This tutorial gives some background information on the differences between the choices.
What is GIF?GIF stands for Graphics Interchange Format, and it was developed years ago by some people at Comp
uServe. A GIF image uses a redundancy-finding compression algorithm that is virtually identical to that used in ZIP files. This particular algorithm also suffers no data loss when the image is saved, making it ideal for use in high-color and complex image
s. The popularity of this format on the Internet attests to that :)
The only real disadvantage to the GIF format is that it requires decompression on the part of any program that uses it. This is counteracted, however, by a great deal of free source code which can do exactly that. Overall, GIF is an excellent format to st
ore images in.
What about JPEG?The JPEG standard was developed by the Joint Photographic Experts Group as a way to compress images by a large amount. The problem with JPEG compression is that it is lossy: the data that is saved is different from t
he original image data.
JPEG works by exploiting the human eye's inaccuracy and saving data which is close, but no exactly, the original data. In this way, JPEG creates rather small files which are often smaller than a GIF image of the same scene. The other weakness of JPEG imag
es is that they tend to look terrible (not always, but sometimes) when the original image is artificial rather than natural. For best results, only use JPEG for photographic images. Nevertheless, it is also prevalent on the web and saves a good amount of
bandwidth because of the compression ratio.
What is a bitmap image?A bitmap image is probably the simplest image to work with. Unlike the JPEG and GIF images which require decompression, bitmaps are just what they sound like: a list of all of the
pixel colors for the image. Even a novice programmer can open, modify, and write bitmap images in most computer languages, and there is no wasted CPU time for decompression.
Therefore, you're probably wondering "if bitmaps are so easy, why doesn't ever
ybody use them on the web?" Well, it turns out that bitmaps are also very large. In many cases, a GIF image that will take up 50K will take up close to a megabyte as a bitmap. Just imagine how long it would take to download your favorite web page if the i
mages were so large! So, bitmaps are usually not used on the web. Their primary use is for icons and desktop wallpaper because of the ease of use.
Are there many others?Yes, there are, but it is pointless to describe the rest of them. The usual re
ason for different formats is to save a program's printer settings, page setup, or other information. It would be awkward to make users have separate files to store this data, so it is often added into some image format (such as a GIF or a bitmap) as a he
Return to the main page