How do I make the ImageMagick Imagick class available?
This is really an amateur question, but I installed ImageMagick from ports on my FreeBSD.
However, when I use
$image = new Imagick($filename);
I get:
Fatal error: class "Imagick" not found in /usr/local/www/test.php on line 1
How do I make this class scriptable?
+2
lalalow
source
to share
3 answers
pecl install imagick
See the manual .
+3
Ewan Todd
source
to share
You have installed the ImageMagick suite itself, which does not provide any interface to PHP. You also need to install the PECL Imagick extension extension .
FreeBSD has a port for this - graphics/pecl-imagick
.
+2
etheros
source
to share
You will also need to get / create an accompanying PHP library that interacts with Image Magick. Then add it to your php.ini with something like:
extension=php5-imagick.so
There is also an OS X / Darwin port here .
+2
Jon Kirkman
source
to share