written 6.2 years ago by | • modified 6.2 years ago |
A digital image is often encoded in the form of binary files for the purpose of storage and transmission.
A file format is a method used to store digital data and different file formats exist for storing images.
Different file formats may compress the image data by differing amounts.
Whatever be the format, the image file consists of two parts:
(i) file header, and (ii) image data.
The information stored in the header and image data sections are shown in Fig
Header Information
The header part contains some of the vital information like format or version identification, width and height of the image, type of the image (binary, grayscale, color image), and image data format which specifies the order in which pixel values are stored in the image data section. The header also specifies the type of compression mechanism.
The length of the file header is often fixed. The header information must provide all the necessary information to reconstruct the original data and its organization from the stored data.
Common Image File Formats
Various image file formats are widely used for the purpose of digital image storage and retrieval. Each of these file formats possess certain characteristics which make them suitable for various applications. The common image file formats are:
i. GIF (Graphics Interchange Format)
ii. JPEG (Joint Photographic Expert Group)
iii. PNG (Portable Network Graphics)
iv. TIFF (Tagged Image File Format)
i. GIF (Graphics Interchange Format)
GIF, or Graphic Interchange Format, is a file extension for an often-animated raster graphics file and is the second most common image format used on the World Wide Web after JPEG GIF uses the LZW compression algorithm and is owned by Unisys.
Though Unisys licensing statement indicates a license is required to use GIF files, in practice they have not required it and many downloaders and website builders remain ignorant to the required license and GIF’s proposed patent-free replacement in PNG.
ii. JPEG (Joint Photographic Expert Group)
JPEG is not actually a file type. JPEG is the most important current standard for image compression. JPEG standard was created by a working group of the International Organization for Standardization (ISO).
This format provides the most dramatic compression option for photographic images. JPEG compression is used within the JFIF file format that uses the file extension (.jpg).
This format is useful when the storage space is at a premium. JPEG pictures store a single raster image in 24-bit color.
JPEG is a platform-independent format that supports the highest levels of compression; however, this compression is lossy. Progressive JPEG files support interlacing.
iii. PNG (Portable Network Graphics)
PNG stands for Portable Network Graphics. PNG is a bitmapped image format that employs lossless data compression.
PNG was created to improve and replace the GIF format, The PNG file format is regarded, and was made as a free and open-source successor to the GIF file format.
The PNG file format supports true color (l6 million colors), whereas the GIF file format only allows 256 colors. PNG excels when the image has large areas of uniform color.
The lossless PNG format is best suited for editing pictures, whereas the lossy formats like JPG are best for the final distribution of photographic-type images due to smaller file size.
Yet many earlier browsers do not support the PNG file format, however with the release of Internet Explorer 7 all popular modern browsers fully support PNG. Special features of PNG files include support for up to 48 bits of color information.
The PNG format utilizes a 2D interlacing scheme, which progressively displays the image much faster than a GIF image file. Gamma correction allows the values displayed on any platform to be the same as that of the original.
iv. TIFF (Tagged Image File Format)
TIFF stands for Tagged Image File Format and was developed by the Aldus Corporation in the 1980s. It was later supported by Microsoft.
TIFF files are often used with scanned images. Since a TIFF file does not compress an image file, hence images are often large but the quality is preserved.
It can handle multiple images and data in a single file through the inclusion of 'tags' in the file header. Tags can indicate the basic geometry of the image, such as its size, or define how the image data is arranged and whether various image compression options are used, and uses a filename extension of TIFF or TIF. The TIFF format is often used to exchange files between applications and computer platforms.
Within TIFF, a lossless compression routine known as LZW is available. This reduces the size of the stored file without perceptible loss in quality.
The goals of the TIFF specification include extensibility, portability, and revivability.
- | GIF | JPEG | PNG | TIFF |
---|---|---|---|---|
Available colors | 256 | 16000000+ (& transparency) | 16000000+ | Variable |
Compression | Lossless | Lossy | Lossless | Dynamic |
File Size | Small (<1MB) | Very small to small (<1MB) | Large (1-2 MB) | Very Large (5-10 MB) |
Typically used for | Animations | Online and email | Online, editing and storage | Specific tweaks to encoding |