Difference Between JPG, GIF, PNG, BMP Image Formats

When we browse the web, we see images. To the average user, an image is just a bunch of pixels. But in reality, there are many different types of image formats; each as different as chalk and cheese. The four common types are – JPG, PNG, GIF and BMP.

Collage

If that’s all Greek to you, don’t worry because this little article will try to put each of the four popular image formats in their place. Each image format is created for specific uses, and as such, each has its own advantages and disadvantages. All raster images where each bit of image data is saved as pixels (small dots of individual color) are saved in any one of these formats.

JPG (Joint Photographic Expert Group)

JPG is the de facto standard image format and the most commonly used format on the web. JPG supports 16.7 million colors and is the preferred format for photos. JPG files are also smaller in size compared to other image formats because it uses ‘lossy’ compression to reduce the file size.

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

See more:  How to Fix Messenger Select an Account Problem 

JPG images are ideal for photos with rich colors, gradient images, and web images with their small size. It is not suitable for drawings and animations. JPG also doesn’t support transparency.

GIF (Graphics Interchange Format)

If an image has large areas with solid or flat colors, GIF is the format of choice. Think logos, icons, banners and cartoons are all the best GIF images. The GIF format supports 256 colors (i.e. an 8-bit palette). Since they use only 256 colors, they produce a compact image and consume less bandwidth.

GIF is widely used in animation because it allows transparency and interlacing (an image becomes clearer when downloaded). They lacked the color range to be used for photographs and gradually became less and less used.

PNG (Portable Network Graphics)

The PNG format was designed as an elegant alternative to GIF. It was also designed as a patent-free open format that could be used by anyone, as opposed to the proprietary GIF format. PNG handles transparency more efficiently than GIF.

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

BMP (Bit Map)

The native file format of the Windows platform is the same as the native file format of the above three formats. BMP formats generally do not allow compression of images unless they are saved in any of the formats discussed above. BMP images are sharp and accurate, but are pixel dependent so they don’t scale well. On the web, details come at the expense of file size and that’s why you won’t see BMP images used on the web.

See more:  5 Best Ways to Check Hard Drive Space on Mac

Which one to use?

Using a particular image format will vary from situation to situation, but here are general rules you can follow.

  • JPG is the most common format in use. But you should be careful because the image quality will decrease after each save.
  • PNG makes great screenshots if there is no gradient in the original source. PNG is also a good choice for images that need transparency.
  • GIFs are great for clipart and drawings with limited color use.

So which image formats above do you come across or use often?

Categories: How to
Source: thpttranhungdao.edu.vn/en/

Rate this post

Leave a Comment