I can take the command and have it echo the exact command and then run it in a shell and it works and generates the image. However when it is run though exec it does not work.
exec('convert ' . $from_path . ' -trim +repage -resize ' . ICON_SIZE . 'x' . ICON_SIZE . '> +repage -gravity center -background none -extent ' . ICON_SIZE . 'x' . ICON_SIZE . ' ' . $to_path);
echo 'convert ' . $from_path . ' -trim +repage -resize ' . ICON_SIZE . 'x' . ICON_SIZE . '> +repage -gravity center -background none -extent ' . ICON_SIZE . 'x' . ICON_SIZE . ' ' . $to_path;
I have simply copy and pasted the echo into the shell and the icon is generated. This is not the only exec in my program nor is it the only one I use with imagemagick. Any light you could shine on the issue would be appreciated.