Choosing the Correct Image Format


March 15, 2006 by Jared Goralnick

I just came across this excellent tutorial about which image format to use under which circumstances (via Lifehacker). I agree with the tutorial’s analysis, but will offer one thing to look out for (discussed further down). I mention this whole topic as it seems to come up on a regular basis with developers, designers, and clients. If I’m lucky they ask in what format I’d like an image. More often they just send me the file either in an obscenely large email attachment or in a format that looks poor even for the web.

The gist of the article is that one should use the JPEG file format for photography (or images where there are LOTS of colors, such as the detail found in video games), and one should use 8-bit PNG for “text, line art, comic-style drawings, [and] general web graphic[s].” Outside of animation, GIFs are less appropriate and use a bigger file size.

The key point of the article, in addition to providing a tutorial, was to debunk the myth that GIFs are the only web friendly format outside of JPEG. As 8-bit PNGs use 256-colors the same as GIF, it becomes a matter of which format does a better job encoding…and PNG usually results in smaller file sizes. Better yet, PNG is more flexible for transparencies.

My issue of contention is whether the 8-bit version of PNG is available within the graphics programs that a lot of people work with. While Fireworks, PhotoShop and similar professional tools provide options of what type of PNG to export, most programs (like Paint or the Microsoft Office Picture Manager) only allow exporting to 24-bit PNG, a format that can take a lot of disk space.

I know that the author (Richard Stanway) was targeting people who have graphics applications, but sadly the default tools that come with Windows and Office only export to the higher resolution and file-size PNG, even if it’s totally unnecessary. Even SnagIt (I’ll admit I’m on version 7, not 8), will not default to the correct PNG file format for some screenshots. It has an option of manually overriding the PNG setting, but it can only be done on a screenshot by screenshot basis.
Hopefully the article still proves enlightening, but I just wanted to point out that one has to be particularly careful in choosing what type of PNG one is creating. Now I think I need to go back through some of the tutorials on my various sites and swap some GIFs for JPEGs…

You should really subscribe to Technotheory via Subcribe via email email or rss.



Impart Your Theoretically Interesting Wisdom


Your Comments