Hi,
I am trying to use ImageMagick with PHP, but not quite sure how to get started. My host told me it was installed on my server and he gave me the path (/usr/X12R6/bin).
But how do I talk to it now? I checked a couple of websites and there seem to be two different approaches of using imagick:
- use the system() function of PHP. The line of code looked something like this:
system("convert -sample 80x40 images/xmas.jpg images/xmasth.jpg ", $retval);
- using a dynamic library. The code I found was following line:
if(!extension_loaded('imagick')) { dl('imagick.so'); }
After the execution of this line, it seems image magick was meant to recognise the custom functions.
However, none of the two solutions worked for me. The first option didn't return anything in $retval. The second option gave me an error message:
Unable to load dynamic library './imagick.so' - ./imagick.so: cannot open shared object file: No such file or directory
If anybody could lead me onto te right path, that'd be fantastic!