Images

Image formats used

All the images in this site are in either PNG or JPEG. PNG has advantages compared to GIF in terms of better compression and more colour depth (it can handle 24-bit colours, as opposed to a mere 8-bit for GIF). However, it's not suited for photos, due to lack of smoothly varying colours or large areas with the same colour. This problem doesn't happen with JPEG, because of it's lossy compression.

Gamma problem

In developing this website, I found out the PNG gradients I used looked terrible in IE. IE is renowned for it's lack of PNG transparency support, so I figured if I didn't use the transparency channel, it'd be alright. How silly of me. It turned out that IE used the gamma information from the header. By default, Windows machine uses a gamma setting of 2.2 by default. Macintosh uses a value lower than this, although I am not sure of the exact value. This is why images that look good in Windows will look too bright in Macs, and images that look good in Macs will look dim in Windows. I have no idea what gamma Linux uses. Anyway, this means to compensate for this gamma value, PNG files created in Windows sometimes puts a gamma ("gAMA") chunk of 0.45454, to make an effective gamma of 1. Most browsers will ignore this information. But not IE. So, the trick is to delete this information from the PNG file itself. The program which allows us to do that is called TweakPNG.

Screenshot of TweakPNG

The TweakPNG screen showing the "gAMA" chunk

I briefly mentioned IE's lack of support for PNG transparency. This is actually not that hard to circumvent using TweakPNG. The trick is described in detail at Newt Edge's 32-bit PNG degradability in IE.

Reset style