JPEG Image Files

The JPEG (Joint Photographics Experts Group) format is also standard throughout the web. It was created by a technical committee a number of years after GIF was created.

The files usually have the .jpg suffix.

Photographs

The JPEG format is most commonly used for photographs.

Photo of the Naperville Metra train station

A photo of the Naperville Metra station

Image dimensions: 300x200; Image size: 21K

True Colors

The goals of the JPEG format was very different than GIF. Preserving the quality of an image was paramount.

JPEG supports 24-bit color: 8 each for Red, Green and Blue (RGB)
These are called "true color" images because their quality is near the true colors of the original image

Hey, web palette!

Hey, what about that "web palette" stuff! Well, if your monitor doesn't support colors referenced in your images, then your browser does its best to approximate the colors with what it has.

Hey, compression!

In JPEG format you control how much compression goes on. This is usually offered in some way by your image editing program.

There's a catch! JPEG implements a "lossy" compression scheme. The smaller your file size, the more detail is lost (forever!) from your image.

Here's out train station compressed some:

Photo of the Naperville Metra Station (again) compressed using JPEG

The Naperville Metra train station again

Compressed to 13KB

Pros and Cons

Use JPEG files for:

Photos
Detailed or complex graphics

JPEG cons are:

Compression can lead to bad images
You have to know about compression and control it

 

 

 

Next page