Before knowing the various file formats to store images, we need to understand about compression.
Compression:In simple words,to compress the image or to reduce the size of image.
There are two types of compression- lossless and lossy.
Lossless compression reduce file size while saving a perfect copy of the original uncompressed image. Lossless compression generally results in larger files than lossy compression because it doesn't loose the picture quality.
Lossy compression preserve a the original image that may appear to be a perfect copy, but it is not a perfect copy. Lossy compression achieves smaller file sizes than lossless compression. Most lossy compressions always lead to the degradation in image quality by reducing the file size reduces as the picture is edited again and again.
Major graphic file formats
There are various image file types i.e. PNG, JPEG, and GIF formats are most often used to display images on the Internet. These graphic formats are listed and briefly described below, separated into the two main categories of graphics: raster and vector.
- JPEG (Joint Photographic Experts Group) is a lossy compression method.
- Usually stored in the JFIF (JPEG File Interchange Format) file format.
- Extension : JPG or JPEG.
- Nearly every digital camera can save images in the JPEG/JFIF format, which supports 8-bit grayscale images and 24-bit color images (8 bits each for red, green, and blue).
- It applies lossy compression to images, which can result in a significant reduction of the file size.
- JPEG files suffer generational degradation when repeatedly edited and saved. (JPEG also provides lossless image storage, but the lossless version is not supported generally).
- JPEG 2000 is a compression format that enables both lossless and lossy storage.
- The compression methods used are different from the ones in standard JFIF/JPEG; they improve quality and compression ratios.
- They also require more computational power to process.
- JPEG 2000 also adds features that are missing in JPEG. It is not nearly as common as JPEG, but it is used currently in professional movie editing and distribution (some digital cinemas).
- The Exif (Exchangeable image file format) format is a file standard similar to the JFIF format with TIFF extensions.
- It is incorporated in the JPEG-writing software used in most cameras.
- Main purpose: To record and to standardize the exchange of images with image metadata between digital cameras and editing and viewing software. The metadata are recorded for individual images and include such things as camera settings, time and date, shutter speed, exposure, image size, compression, name of camera, color information.
- The actual Exif metadata as such may be carried within different host formats, e.g. TIFF, JFIF (JPEG) or PNG. IFF-META is another example.
- The TIFF (Tagged Image File Format) format is a flexible format that normally saves 8 bits or 16 bits per color (red, green, blue) for 24-bit and 48-bit totals, respectively.
- Filename extension : Either the TIFF or TIF.
- TIFFs can be lossy and lossless; some offer relatively good lossless compression for bi-level (black&white) images. Some digital cameras can save in TIFF format, using the LZW compression algorithm for lossless storage.
- TIFF image format is not widely supported by web browsers. TIFF remains widely accepted as a photograph file standard in the printing business.
- OCR(Optical Character Recognition) software packages commonly generate some (often monochromatic) form of TIFF image for scanned text pages.
- RAW refers to raw image formats that are available on some digital cameras.
- These formats generally use a lossless or nearly lossless compression, and produce file sizes smaller than TIFF formats.
- Most cameras have their own software for decoding or developing their raw file format, but there are also many third-party raw file converter applications available.
- Adobe's Digital Negative (DNG) specification is an attempt at standardizing a raw image format to be used by cameras.
.R3Dextension), which stores still as well as audio + video information in one lossy-compressed file.
- GIF (Graphics Interchange Format) is limited to an 8-bit palette, or 256 colors. This makes the GIF format suitable for storing graphics with relatively few colors such as simple diagrams, shapes, logos and cartoon style images.
- 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 color, and ineffective for detailed images or dithered images.
- The BMP file format (Windows bitmap) handles graphics files within the Microsoft Windows OS.
- BMP files are uncompressed, hence they are large; the advantage is their simplicity and wide acceptance in Windows programs.
- PNG (Portable Network Graphics) file format was created as the free, open-source successor to GIF.
- PNG file format supports 8 bit paletted images and 24 bit true color (16 million colors) or 48 bit true color with and without alpha channel - while GIF supports only 256 colors and a single transparent color.
- Compared to JPEG, PNG excels when the image has large, uniformly colored areas.
- It is best suited for pictures that are under edition - and formats, like JPEG, are best suited for the final distribution of photographic images, because JPG files are usually smaller than PNG files.
- PNG provides a patent-free replacement for GIF.
- PNG is robust, providing both full file integrity checking and detection of transmission errors.
Vector image formats have a geometric description which can be rendered smoothly at any desired display size.
All the vector graphics must be rasterized in order to be displayed on digital monitors.The vector images can be displayed by using analog CRT technology and used in some electronic test equipment, medical monitors, radar displays and video games.
Plotters are printers that use vector data rather than pixel data to draw graphics.
- CGM (Computer Graphics Metafile) is a file format for 2D vector graphics, raster graphics, and text.All graphical elements should be specified in a textual source file that can be compiled into a binary file or one of two text representations.
- CGM provides a means of interchange of graphics data for 2D graphical information and it is not dependent from any specific system.
SVG (Scalable Vector Graphics) is an open standard , developed by the World Wide Web Consortium to fulfill the need for a versatile and all-purpose vector format for the web.
SVG format does not have a compression scheme of its own. Because of its scripting potential, SVG have a major role in web applications.
Author Credit: Priya Gupta