Loading...

April 4, 2011 1,901 views

Comparison of PNG and JPEG file formats

Features and differences of web graphic formats

Le'ts take a look on what are the differences and uses of PNG and JPEG formats and which one is better?

About PNG file format

PNG (Portable Network Graphic), pronounced "ping", is a graphic format intended for a lossless compression of raster graphic. This file type was developed as an improvement and replacement for the older GIF file format, which was at that time protected by patents (LZw84 algorithm). PNG offers support of 24bit color depth and compared to GIF it has no limitation of 256 colors at the same time.

PNG format has mostly already replaced GIF format, because it offers more colors and better compression (deflate algorithm + filters). On top of that it also has 8bit transparency (alpha channel), which means that the picture can be in some of it parts transparent, so called RGBA color model.

The disadvantage of PNGs over GIFs is the lack of support for simple animations. There were some attempts for such file formats, but the APNG and MNG file formats didn't make a breakthrough to became a common format.

PNG format, much like GIF and JPEG file formats, is ideal for use on internet.

Comparison to JPEG file format

JPEG can create much smaller files than PNG for photos or realistic visualizations, because it uses a lossy compression method specially designed for photographs. Portable Network Graphic format has, with the same quality, 5x - 10x larger file size compared to JPEG. On the other hand the PNG format is much better for pictures that contain text, vector based graphics or monochromatic areas and also compared to JPEG file format support transparency.

If both photo and other graphical elements are present, its matter of choice between clear lossless PNG file format or small sized lossy JPEG format. For obvious reasons, JPEG format is also bad choice for archiving pictures for later use. That makes PNG a better choice for saving photos, if you want to work with them in the future. Only the final photo, meant for distribution over internet, can be saved in JPEG format at the cost of details.

PNG pictures can also contain metadata, but their format is not strictly defined as it is in the JPEG file format. JPEGs contains metadata in Exif format that contains information about digital camera, time, exposition, etc. that are used by professional photographers.

JPEG file format is historically meant for online distribution of large photos, for it is is much better than previously used GIF file format.

Where and how to use PNG file format?

From the previous info it's clear, that Portable Network Graphic format is, thanks to its high color depth, lossless quality and especially 8bit transparency, great especially for creation of internet graphic, logos, navigation menus and other design elements used on web sites.

For this reasons, PNG format is clearly superior over JPEG, especially because of its support of transparent layer. This is especially handy for logos that can be applied on every background of the web.

Its clear that PNG file format is great for web, but JPEG will always remain the "king" of photography formats for which it was specifically designed.

Related articles

July 11, 2025

JPG images are ending

JPG images, which have been everywhere on the internet for decades, are now on the decline. New tech...

Read more
February 18, 2021

Best programs for finding duplicate files

Whilst few duplicities of small files do not bother anyone, in case of huge audio or photo collectio...

Read more
October 26, 2017

How to import photos and videos from PC to Instagram

Hundreds of millions of users use Instagram to share their selfies and other photos with their frien...

Read more
June 28, 2017

How to get text from image

A lot of computer users dealing with documents eventually encounter situation when they need to get...

Read more
February 4, 2015

Create embroidery from photo or picture

A company logo, a funny pictogram or whatever picture can be nowadays turned in to embroidery design...

Read more
August 20, 2014

Turn any YouTube video to an animated GIF

Ever seen animated picture in some Facebook or forum post and wondered how people make them? Now eve...

Read more