I tried ImageMagick and the Perl Image::Magick for a while. However, PPM's kept being written as 16-bit RAW files, GIF's and PNG's weren't optimized tightly, and as you said, the docs aren't great.
So I switched to NetPBM. Granted, I'm still forking off processes but it's a straight-forward set of tools.
Re: ImageMagick command line replication with Image::Magick