Chapter 20. 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.” JPEGs
use either the .jpg
or
.jpeg
suffix.
Like any graphics file format in 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 nearly all other current browsers.
24-Bit Color
JPEG images contain 24-bit RGB color information, which means they are comprised of colors from the true color space of millions of colors (see Chapter 3 for a description of 24-bit color). 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, a browser reduces the colors in the image to its built-in web palette, and some dithering occurs. In general, however, dithering is often acceptable in photographic image areas. For an explanation of the web palette, see Chapter 3 and Chapter 22.
Get Web Design in a Nutshell, 2nd Edition 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.