| Herd Software Development
|=
DaVinci Graphics Library
|==
DaVinci Documentation Home Search Order


An introduction to the JPEG file format

The JPEG file format differs from the other file formats supported by DaVinci in one critical area: it is lossy. JPEG's compression technology reduces the "true" quality of the image in order to achieve its striking file size reductions. That means that each time an image is exported in JPEG format, even if the imported file was a JPEG itself, it loses more quality. Whether repeated compression with JPEG results in a significant reduction in quality depends both on the method of compression used and the esthetic determination of the person viewing the image.

JPEG was designed specifically for use with highly detailed or "photorealistic" images, and is typically applied to rendered images and digitized photographs. It is not suitable for use with rough drafts, line drawings, screen captures and other image types which used sharply-defined lines and colored regions.

JPEG stores all bitmaps, including grayscaled JPEGs, as TrueColor images at 24 bits per pixel or resolution.

On its face, JPEG compression is an amazing storage reduction technology. You can typically compress photographic images by 90 percent or more over the size of a comparable uncompressed .BMP or .TIF bitmap. Typical file compression schemes might not be able to achieve even a 20 percent reduction on the same file. The reason JPEG can achieve this level of compression is because it discards information in the image which it decides is not important to the appearance of the image.

In order to achieve the best possible results with JPEG images, compression should only be applied to the original uncompressed image, and this image should be repaletted to 24 bits if necessary prior to compression.

DaVinci's JPEG compression and decompression routines are based upon the free source code provided by the Independent JPEG Group. The most recent revisions of this source code are available from numerous locations on the Internet and can easily be located using a web search on the keywords "download", "Independent JPEG Group" and "source code". Recent source code archives have included useful precompiled utilities for compressing of .BMP images in JPEG format with control over virtually every compression option available in the JPEG specification.

Þ http://www.jpeg.org/public/jpeglinks.htm