Image manipulation with PHP and GD2

If you ever find yourself doing image manipulation with PHP, be sure to use a true colour image as the target when using imagecopyresized() as it doesn't mess the colour palette up. This means you're not restricted to 256 colours, which can look really, really crap.

Note that the manual page for imagecreatetruecolour() doesn't mention its superiority over imagecreate(), but imagecreate's page mentions its inferiority.