Switching to Ruby for scripting GD

Unfortunately, the Perl GD interface doesn't let me control whether
or not the image is true color or indexed and it was easier to rewrite
the script than fix GD-Perl.