Monday, 11 November 2013

55. JPEG, Bitmap, GIF, PNG – What’s the Difference?


In most areas of technology, whenever a fight starts there tends to be just one winner. For instance, remember the battle for video-recorder dominance back in the 1980s between Betamax and VHS? They slugged it out for a while, VHS won, and Betamax slunk off to its corner. In computing, though, everything can be a winner as long as it has some modicum of usefulness. Prime examples of this are picture files, which you can save in a confusing variety of ways.

Whenever you save a picture in a picture-editing program, you’ll regularly choose between the ‘Big Four’ file formats mentioned in the title of this item, and perhaps a few others that don’t really matter. But what’s the difference between them, and which should you use?

Bitmap: this is the simplest type of picture file. Every individual dot of colour that makes up your picture is saved into the file in a long stream of numbers. The file isn’t compressed (you’ll see the significance of this in a moment), so a bitmap file can be huge. Let’s say you take a photo with a 5-megapixel camera, load it into a picture editor and save it as a bitmap (a file with a .BMP extension): that file will be about 16 MB. It’s big, but it’s an absolutely faithful copy of what you see on the screen.

JPEG: this is a file with a .JPG extension, and it’s the most common format for photos and any other pictures with true-to-life colour. The difference between a JPEG and a bitmap is that a JPEG is compressed: if you load that same 5-megapixel photo into a picture editor and then save it as a JPEG file, the file you get will be under 1 MB. That’s tiny compared to the high-quality bitmap, but there’s a reason it’s so small: the JPEG format uses ‘lossy’ compression.

The word ‘lossy’ is one that probably looks quite technical, but it’s actually another of those slightly-silly computing words. It really does mean that you lose something – there’s a loss. What you lose with JPEG is some of the fine detail in the photo, so the quality isn’t as good as that of the bitmap. And if you repeatedly edit a picture, save it as a JPEG, edit it again, and save it as a JPEG again, you’ll lose more and more detail each time.

GIF: here’s a spot of welcome relief – if you’re editing photos, you don’t care about GIF! It’s mainly used for hand-drawn artwork, such as cartoons and logos.

PNG: in case you’re wondering, it’s pronounced ‘ping’, and it’s a lovely file format. It’s a little like JPEG, in that it’s compressed, but that compression is ‘lossless’. You can probably guess what that means: none of the detail is removed from your picture. Returning to that 5-megapixel photo which ended up as a 16 MB bitmap (or a 1 MB JPEG with its quality reduced), a PNG version should be a little under 4 MB and will look just as good as the bitmap.

Most digital cameras save their photos as JPEG files, and that’s as a trade-off between quality and size. The quality won’t be quite as good as it could be, but that powerful compression means you can take and store lots of photos. If you copy those photos to your PC and keep them as they are, unedited, it’s fine to leave them as JPEG files.

But if you’re serious about photography and you use a photo-editing program like Adobe Photoshop Elements or Corel PaintShop Pro, then a better choice is to use PNG throughout editing and keep it at the end. The lovely thing about PNG is that it covers all bases: it retains all the quality of the original, so it’s fine for editing, but it’s nicely compressed so it doesn’t take up a huge amount of disk space.


From PC Tips for Seniors www.pcforseniors.co.uk.
(c) PC Tips for Seniors

---------------------------------