I'm trying to get ImageMagick working on my local machine (Mac) mainly to test it works without having to upload it to the server it will eventually be running on, but also because it should and it's annoying me that it's not!
So I'm converting a pdf to a gif and I've got IMGK and GhostWriter all installed and I've even got it converting successfully when running from the command line, just the way I want it. Here's the command I'm using:
convert file.pdf[0] -antialias -resize 105x150\! -shave 1x1 -bordercolor "#000000" -border 1x1 -colors 64 file.gif
I tried running it in PHP using exec
but it won't have any of it. I've checked the permissions of the source and destination files and run chmod 777
on them just for good measure so I don't think it's that.
If I run convert
with no arguments and use the second variable to PHP's exec
to log the output I get the usual help text with all the various options and switches available, so I know that exec
is working and convert
is accessible to the process. However when I add the arguments I get no output, either logged to the second variable or in the way of converted images.
Very odd, very frustrating!
Any suggestions?