|
About Image File FormatsThere are many different formats for storing images in computer files. Different formats use various methods for packing image pixels into files. JPEG Format For digital cameras and photos on the Internet, the JPEG format is by far the most popular. It is popular because it compresses the image data very efficiently, resulting in much smaller files than other formats. JPEG is called a lossy format, which means image quality is slightly degraded during compression. JPEG does a remarkably good job of producing small image files with good image quality. So good that the degradation can be very hard to discern. With JPEG, you can trade-off file size for image quality by changing the amount of compression. For example, you can compress aggressively and accept a lower image quality. Or you can compress gently and preserve almost all the original image quality. You can often recognize images that have been excessively compressed by their "blocky" artifacts. Digital cameras and image editing programs let you to set the compression level for saving JPEG files. (Sometimes the control is called "quality" instead. High quality is the same as low compression, and vice versa.) Here's an example of how JPEG compression affects file size:
Unfortunately, JPEG compression level is not a good predictor of file size. Even with images having the same pixel dimensions, the file size can vary over a range of 5-to-1, depending on the amount of detail in the images. Achieving a specific file size therefore requires trail-and-error with every image. If you're resizing images, our JpegSizer program avoids this problem by automatically calculating what compression level will give the desired file size. The slight degradation introduced by JPEG compression accumulates every time you open a file, make changes, and save it. When saving changes, you can minimize the cumulative effects by using a very low compression setting such as 3 or 5 (or a very high quality setting such as 95 or 97). One technique for avoiding this issue is to: convert your original JPEG files into TIFF format; save all edited versions as TIFF files; then convert back to JPEG as a last step before use. TIFF and RAW Formats Some digital cameras will let you store photos in TIFF or RAW formats. These are lossless formats, which means that the images have not suffered any degradation at all. On the other hand files are gigantic, so memory cards and hard drives fill up much faster. TIFF is a standard format, but RAW files have camera-specific formats. Some TIFF files contain images using various lossless compression techniques, but they don't compress photo images very much. TIFF and RAW files are not used on web pages, because browsers can't display them. BMP and GIF Formats Although not supported by digital cameras, these lossless formats are quite common. Like TIFF files, BMP files are very large, their compressed version doesn't compress photo images well, and they can't be displayed by web browsers. GIF files can be displayed by web browsers, but the format only supports 256 colors and is generally used only for line art (not photo images). JPEG-2000, PNG and yEnc formats These recently introduced formats compete with JPEG. They are not widely supported and are unlikely to displace the clear favorite for photo images. Some recent web browsers support PNG files. |