Integrate ImageMagick & MagickWand with php ubuntu 12.04

752 views Asked by At

I have installed both ImageMagick and MagickWand in my ubuntu system by refering to the detailed instructions provided in Install ImageMagick From Source and MagickWand For PHP. When I chack whether ImageMagick is installed or not by command identify -version, it shows me follwing message

Version: ImageMagick 6.8.7-9 Q16 i686 2013-12-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib djvu fontconfig freetype jng jp2 jpeg lcms lqr openexr pangocairo png tiff x xml zlib

That means Image Magick is installed. And When I check the version of MagickWand with MagickWand-config --version it also shows me the version number 6.8.7 Q16.

But problem is when I try to intialize the wrapper class of the MagickWand i.e. $magick_wand=NewMagickWand(); It shows me the Fatal Error as follows,

Fatal error: Call to undefined function NewMagickWand()

Can somebody tell me where did I make a mistake and how to make it work with php.

1

There are 1 answers

11
norway-firemen On BEST ANSWER
$img = new Imagick();

More info here: http://php.net/manual/en/book.imagick.php

This seems to have been the fix: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=22911