JPG vs PNG

JPG vs PNG.

Whether you are a webmaster, photograph, designer or a blogger - you have probably already wondered what format to choose for your image files.

Some days ago I changed the format of the background images for my blog. Not only did it save a lot of bandwidth by making the images smaller in size, it also improved their quality to nearly 100%.

Whether it is better to choose JPG or PNG depends on the type of image and where you want to use.

Field of application

The first question you should ask yourself - where am I going to use the images? If you plan to use an image in a local network, I would suggest you to make image quality the primary goal. The same goes for images you want to archive.

When bandwidth and disk space matters you should put in some effort to convert your image files to a good format. Not only for the sake of your servers bandwidth - it is for the users also who might be possibly on slow internet connections.

A user who needs to download several 200KB images off your site just to display the page is easily annoyed and tempted to leave.

Photographic images

When it comes to photographic images, JPG produces much smaller files. They contain a lot of details - the JPG compression removes some of these details to reduce the size.

JPG is a poor choice for archiving. If your image needs further editing, it might look worse every time you save it. An image which has been saved and edited under the JPG format several times might look like this (notice the details of the tree in the right of the image):

An image saved multiple times using the JPG format.

Whereas, if you saved it under the PNG format it would look like this (it’s nearly 25 times bigger in file size than the previous one!):

An image saved multiple times using the PNG format.

So only use JPG when you want to distribute your image.

Encoding a photographic image in PNG results in a much higher file size, but better quality.

Graphical images

JPG splits the image in bricks before encoding, this is why you should not use it on graphical images. The effect is shown very well on the left image which is encoded with 0% quality JPG, the middle one with 80% (which is usual for JPG) and the right one using PNG. All with 2x zoom:

JPG 0% vs JPG 80% vs PNG

The quality of the left image is unacceptable. The middle one is alright - and the right one is perfect. The PNG image is smaller in file size than the middle one, making it the perfect candidate for graphical images with not so many various colors.

Conclusion

JPG: For distribution of photographic images.
PNG: For distribution of graphical images and for archiving all images.

Your digital camera may produce JPG images. It is alright to archive these under the JPG file format, but as soon as you want to edit them do so using the PNG file format.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google

Tags: , ,

One comment »

  1. Manish Abhang Says:

    Really very useful information provided. Many many of us are not knowing the difference between the jpg and png images. And this information clearly states the difference.

    Good Job :)

    Regards

    Manish Abhang

Leave a Reply