Multimedia Tutorial - JPEG Images

JPEG is one of the main image formats used on the Web.

This article explains the concept and characteristics of JPEG images.

Understanding Image Formats

Neither HTML nor XHTML specifies an official format for images. However, popular browsers have specifically specified certain image formats: usually GIF and JPEG. Most other multimedia formats require special auxiliary applications, and each user of the browser has to obtain, install, and properly operate these applications to view or hear these special files. Therefore, it is not surprising that GIF and JPEG have become the actual standards on the Web.

Before the Web appeared, these two image formats had been widely used, so there is a large amount of supporting software to help us create images in these two formats. However, each format has its own advantages and disadvantages, and some browsers may use their features to achieve special display effects.

JPEG

The Joint Photographic Experts Group (JPEG) is the standardization organization that developed the JPEG image encoding format we use today.

Like GIF, JPEG images are platform-independent and have been specially compressed to transmit at high speeds through digital communication technology. Unlike GIF, JPEG supports tens of thousands of colors and can display more refined and realistic digital images like photographs.

JPEG uses a special compression algorithm that can achieve very high compression ratios. For example, it is very common to compress a 200 KB GIF image to only 30 KB JPEG image. To achieve such amazing compression rates, JPEG has to lose some image data. However, with specialized JPEG tools, this 'loss rate' can be adjusted, so that even though the compressed image is not exactly the same as the original image, they can be very close, to the point where most people cannot distinguish between them.

Although JPEG is a good choice for photos, it is not as suitable for illustrations. The compression and decompression algorithms used by JPEG leave noticeable artificial traces when dealing with large blocks of color. Therefore, if you want to display drawings depicted with lines, GIF may be more suitable.

JPEG format is usually indicated by a file name ending with .jpg (or .JPG), and now almost all graphic browsers can recognize this format. It is only in very rare cases that one might encounter old browsers that cannot directly display JPEG images.