For 2D polygon drawing and other vector graphics, I would recommend GD. If only because its interface is really straightforward, well documented (very much unlike Image::Magick) and fast.
As for transparency / alpha channels, GD allows for 7 bit alpha channels and 8 bit color channels. That should be enough if you're producing images for the web / in standard RGB. GD does not support CMYK as far as I know, which could be a serious problem if you're generating high-quality images for professional printing.
Image::Magick supports more file types and is generally easier to use for straight conversion and resizing etc. GD is fairly limited/low-level but it's well documented, fast, and easy to interface from XS (as in, it's easy to take a GD::Image object and throw some C/XS code at it).
All in all, Image::Magick kind of does what it sounds like: it applies "magic" to transform one image into another. GD on the other hand is a slightly more low-level toolkit.
If you need exactness you want GD. If you just want to convert stuff (and don't mind APIs changing on you every other version) you want I::M. If you want to do something that Image::Magick can't, and you don't mind spending an hour or two of focused coding, GD will probably let you do what you want with a minimum of fuss.
Also of interest (maybe): Imager. Which may be able to produce higher quality images than GD (and at least has a much larger API), but I haven't used it at all.
|