Understanding the different image formats of JPG, PNG, GIF, and BMP

IMAGE CREDIT: candilejasfotografia.files.wordpress.com

Am sure you all have come across different image formats as you browse the web.

Most people look at all images as a collection of pixels. However they are all in different kinds formats.

Visuals graphics are key to attracting and keeping customers, but not all image formats are created equal.

Some are meant for charts and diagrams, while others are intended for eye-catching photographs.

In this post, we are going to look at four of the most common formats.

JPG (Joint Photographic Experts Group)
JPG is the de facto standard image format and the most popular one used on the web. JPG supports 16.7 million colors and is the preferred format for photographs. JPG files are also smaller in size as compared to other image formats because it uses ‘lossy’ compression to reduce the file size.

It may not be evident to the human eye, but JPG images sacrifice some image information to keep file sizes small. Each time you save a file, some data is lost. This loss of image data is not recoverable. Of course, the amount of loss of image data can be adjusted according to the image size you can tolerate. High quality corresponds to low compression, and vice-versa.

JPG images are ideal for rich color photographs, gradient images, and web images for their small size. It is not suitable for line drawings and animations. JPG also does not support transparency.

GIF (Graphics Interchange Format)
If an image has large areas with flat or single tones colors, then GIF is the format of choice. Think logos, icons, banners, and cartoons which are all preferably GIF images. The GIF format supports 256 colors (i.e. an 8-bit color palette). As they use only 256 colors, they make for compact images and consume less bandwidth.

GIF is widely used in animation because it enables transparency and interlacing (an image becomes progressively clearer as it downloads). They lack the color range to be usable for photographs and are gradually being used less.

PNG (Portable Network Graphic)
The PNG format was designed as an elegant alternative to GIF. It was also designed as an open patent free format usable by everybody, as against the proprietary GIF format. PNG handles transparency more efficiently than GIF.

Like GIF, the PNG format supports 8-bit color but also extends it to 24-bits, thus giving you more color ranges to work with like in a JPEG file. PNG files do not support animation. PNG files are also lossless files retaining color information when they are compressed. Richer images will lead to larger file sizes.

BMP (Bitmap)
The native file format of the Windows platform is like the parent format to the above three. BMP formats commonly do not allow for image compression unless they are saved in any of the formats discussed above. BMP images are crisp and precise, but being pixel dependent they don’t scale well. On the web, the detail comes at the cost of file size and that’s why you won’t see BMP images used on the web.

Which one to use?
JPG is the most common format that’s in use. But you should be careful as image quality degrades with every save.
PNG makes for great screenshots if there are no gradients in the original source. PNG is also a good option for images which need transparency.
GIF is great for clipart and drawings where limited colors are in use.

Via Guiding Tech