[thelist] php and imagemagick - not getting anywhere
Kelly Hallman
khallman at ultrafancy.com
Fri Nov 28 16:39:48 CST 2003
On Fri, 28 Nov 2003, Dunstan Orchard wrote:
> I'm tearing my hair out over imagemagick and php. I can't even get the
> simplest example to work, and my host assures me that the path to IM is
> correct and that another site is running IM quite happily on the server.
> I've tried a number of examples from tutorial sites, and none will work.
Dunstan,
I don't know much about ImageMagick. However, I have recently started
using the PEAR module Image_Transform, and find that it works pretty well.
It supports ImageMagick, gd library and NetPBM via a driver interface.
I suggest this because I see you are dropping to a shell to execute your
IM commands, which is what I was previously doing with NetPBM--a kludgy
approach which has always bugged me. The Image_Transform module does it
too, but gives you a nice abstracted interface that is the same regardless
of the underlying driver in use (the drivers are included with the package
and amount to classes that extend the main Image_Transform object).
This also enables you to switch the underlying graphics system without
changing your code. That's a good thing because you can often expect that
one of the three packages will be available on a given host, but rarely
all three (and odds are, probably not the one you were hoping for).
After installing the package, I was able to do my transformations without
any extra setup (I already had NetPBM installed). I also found it easy to
hack in some extra cropping features which were not yet implemented in the
package. I think it's a beta, but what is there seems to work great.
Of course, if there is a problem with your IM install, then this probably
won't help. I thought I would mention this package in case you or others
found it useful. It certainly makes life a lot easier than it was!
You can find the package here:
http://pear.php.net/package/Image_Transform
PEAR rocks, yo!
--
Kelly Hallman
// Ultrafancy
More information about the thelist
mailing list