You’re probably aware that there are plenty of different image file formats out there. JPEG, GIF, PNG, EPS, PDF, TIFF, SVG, BMP… The list goes on and on. A lot of people don’t realize, though, what the major differences are between the different formats, or why they should choose one over another for any given image. So, here’s the answer.
Raster the Disaster.
If you’ve ever bought a digital camera, you’ve probably heard the term ‘megapixel’, where a higher value means a bigger picture. A five-megapixel camera will give you five million pixels per picture, which is a whole lot of binary data. If you take a lot of pictures, it’s a storage disaster waiting to happen. When you put the picture on your computer, though, you probably get a JPEG file. Through the magic of compression, JPEG isn’t nearly that much of a hard drive hog but still looks like it has pretty much all of the original pixels. Basically, JPEG files cut a lot of corners to try to save you hard drive space; one of the most noticeable corners they cut is the straight line.
Victory! It’s a Vector, see?
You’ve probably seen it: a company’s logo with all sorts of inexplicable little boxes that are different shades of a nearby color. The truth is, any JPEG image will have compression artifacts like this, but in a normal photograph, where there aren’t really any solid lines, it isn’t nearly as obvious. Instead of JPEG, computer graphics like this should be saved in a vector-based format, where the file just tells the computer where the lines, circles, letters, etc. are and has it re-generate the image on the fly every time it’s displayed. Used correctly, this can save a lot of bandwidth/hard drive space, be zoomed infinitely without losing any detail, and look much, much better than a JPEG for the right kinds of images.
There’s a whole lot more to be said about the different image formats, but this is all I have time for right now. Rest assured, though; I’ll almost certainly discuss it again.