Chapter 15. JPEG Format

JPEG (which stands for Joint Photographic Experts Group, the standards body that created it) is a compression algorithm used by files in the JFIF format, commonly referred to as “JPEG files.”

Like any graphics file format to find widespread use on the Web, JPEGs are platform-independent. In addition, JPEGs are fully supported for use as inline images in versions 2.0 and higher of Netscape Navigator and Microsoft Internet Explorer, as well as in most other current browsers (see Section 15.5 later in this chapter).

24-bit Color

JPEG images contain 24-bit RGB color information, which means they are comprised from the true color space of millions of colors. JPEG files can also carry grayscale images. This results in higher image quality and more rich and subtle color variations. Unlike GIF files, JPEGs do not use palettes for referencing color information.

Bear in mind, however, that when JPEGs are displayed on a system that only supports 8-bit color, the browser will reduce the colors in the image to the Web Palette, and some dithering will occur. In general, however, dithering is more acceptable in photographic image areas than in areas of flat color. For an explanation of the Web Palette, see Chapter 3, and Chapter 17.

Get Web Design in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.