Image File Formats

Image File Sizes

Image file sizes, expressed in bytes, increase with the number of pixels in the image, and the colour depth of the pixels. The more rows and columns, the greater the image resolution and the greater the file size. Also, each pixel making up the image increases in size as colour depth is increased. An 8-bit (1 byte) pixel can store 256 colours and a 24-bit (3 bytes) pixel can store 16 million colours. The latter is known as true colour.

Image compression is a method of using algorithms to decrease file size. High resolution cameras lead to large image files. Files sizes may range from hundreds of kilobytes to many megabytes depending on the cameras resolution and the format used to save the images. High resolution digital cameras record 8 megapixels (MP) (1MP= 1 000 000 pixels/ 1 million) images, or more, in truecolour. Consider an image taken by an 8 MP camera. Since each of the pixels uses 3 bytes to record true colour, the uncompressed image would occupy 24 000 000 bytes of memory. That is a lot of storage space for just one image, and cameras must store many images to be practical. Faced with large file sizes, both within the camera, and later on disc, image file formats have been developed to address the storage problem. An overview of the major graphic file formats is given below.

Image File Compression

There are two types of image file compression algorithms: lossy and lossless.

Lossless Compression

Lossless compression algorithms reduce file size with no loss in image quality, although compression ratios are generally weak. Most images destined for print, or when image quality is valued above file size, are compressed using lossless algorithms.

Lossy Compression

Lossy compression algorithms take advantage of the inherent limitations of the human eye and discard information that cannot be seen. Most lossy compression algorithms allow for variable levels of quality (compression) and as these levels are increased, file size is reduced. At the highest compression levels, image deterioration becomes noticeable. This deterioration is known as compression artifacting.


The TIFF (Tagged Image File Format) is a flexible image format that normally saves 16-bit per colour - red, green and blue for a total of 48-bits - or 8-bit per colour - red, green and blue for a total of 24-bits - and uses a filename extension of TIFF or TIF. TIFF's flexibility is both a feature and a curse, with no single reader capable of handling all the different varieties of TIFF files. TIFF can be lossy or lossless. Some types of TIFF offer relatively good lossless compression for bi-level (black and white, no grey) images. Some high-end digital cameras have the option to save images in the TIFF format, using the LZW compression algorithm for lossless storage. The TIFF image format is not widely supported by web browsers, and should not be used on the World Wide Web. TIFF is still widely accepted as a photograph file standard in the printing industry. TIFF is capable of handling device-specific colour spaces, such as the CMYK defined by a particular set of printing press inks.


The BMP (bit mapped) format is used internally in the Microsoft Windows operating system to handle graphics images. These files are typically not compressed resulting in large files. The main advantage of BMP files is their wide acceptance, simplicity, and use in Windows programs. However, they may pose problems for users of other operating systems. Commonly, BMP files are used for Microsoft's Paint program. Since most BMP files are uncompressed, and BMP's RLE compression has serious limits, the large size of BMP files makes them unsuitable for file transfer. However, Bit Map images are suitable for background images and wallpapers. This is especially true for screen shots. In addition, images from scanners are usually stored in BMP files.


The JPEG (Joint Photographic Experts Group) image files are a lossy format (in many cases). The DOS filename extension is JPG, although other operating systems may use JPEG. Nearly all digital cameras have the option to save images in JPEG format. The JPEG format supports 8-bit per colour - red, green, and blue, for 24-bit total - and produces relatively small file sizes. Fortunately, the compression in most cases does not detract noticeably from the image. But JPEG files do suffer generational degradation when repeatedly edited and saved. Photographic images are best stored in a lossless non-JPEG format if they will be re-edited in future, or if the presence of small "artifacts" (blemishes), due to the nature of the JPEG compression algorithm (in most of the compressing tools), is unacceptable. JPEG is also used as the image compression algorithm in many Adobe PDF files.


GIF (Graphic Interchange Format) is limited to an 8-bit palette, or 256 colours. This makes the GIF format suitable for storing graphics with relatively few colours such as simple diagrams, shapes, logos and cartoon style images. The GIF format supports animation and is still widely used to provide image animation effects. It also uses a lossless compression that is more effective when large areas have a single colour, and ineffective for detailed images or dithered images.

It is totally unsuitable for photographs.


The RAW image format is a file option available on some digital cameras. It usually uses a lossless compression and produces file sizes much smaller than the TIFF format. Unfortunately, the RAW format is not standard among all camera manufacturers and some graphic programs and image editors may not accept the RAW format. The better graphic editors can read some manufacturer's RAW formats, and some (mostly higher-end) digital cameras also support saving images in the TIFF format directly. Adobe's Digital Negative Specification is an attempt at standardizing the various "raw" file formats used by digital cameras.