Tuesday, 25 October, 2005

I hate images. I really do. You've probably noticed that on this site I rarely use images of any sort. When I do it's for the things that are simply impossible using CSS, like the emoticons I use inline in my posts or for photographs and the like.

A week or so ago, a mere dislike for images was transformed in to unadulterated rage. If the current Labour government were to make insightment to graphical hatred a crime, I would surely be guilty on all counts.

So why do I hate images with such burning passion? Well, there's a number of reasons. My pet hate is that they don't scale at all well. Take for example the simple problem of embedding equations in to a html document. If you look at my article on the Physics of my foam rocket, you will see the equations sitting happily there minding their own business. What could possibly be wrong with them, you ask? The thing is, not everbody has perfect eyes. Take my dad, for example, he is getting on for fifty and when you start getting that old your eyes are not as sharp as they used to be. As a result, my dad has changed his browser's text size to be larger than the default. My equations may look nicely sized for someone like me with near perfect vision but they're probably not big enough for my dad.

The problem is that images like that are a fixed width and height and pixelate horribly if the browser resizes them. If you try enlarging the text on that foam rocket page you will see that everything else becomes larger but the graphics for the equations stay them same size. The equations on that page are a fairly vivid example of this problem but don't make the mistake of thinking this only applies in fringe cases.

Every time you see a button on a web-site that's an image you've probably just found another example of a button that some of your audience will probably not be able to read. It get's worse, even if you decide to overlay the text on to some background image, the background image will probably not scale properly when the text is enlarged, the result of this being the destruction of your careful design.

If you think that's bad, you've seen nothing yet. Take PNG, for example, it's meant to be the free (in both senses of the word) graphics format. The PNG of an identical GIF image is often smaller and PNG has more features, like the alpha-channel, than its GIF counterpart. Unfortuantely, if you want to support Apple computers in your web-site you have to ditch PNG completly.

The problem is that the PNG format was designed so that it'd attempt to do gamma correction on the images so that two images on different monitors would render as the same colour. The problem is that when the guys behind the older versions of Safari implemented this they applied the correction to the images without doing it the css colours. The result is that images that would normally blend with the background are suddenly a different colour. Ooops!

Images just suck in general. CSS is rapidly becoming powerful enough in the later builds of browsers to safely do away with images for the likes of buttons and what not. Images will always have their place, of that I am certain, but after a week of dealing with the frustrations of making images do the job that CSS should be doing (if only browsers would implement it better), I feel that the world would be a better place if people took a stand against the use of silly images.

Simon

22:41:36 GMT | #Programming | Permalink
XML View Previous Posts