I'm using ImageMagick to generate a small thumbnail of images. convert --version shows ImageMagick 4.2.9 99/09/01.
$output = array();
$cmd = "/opt/RZmagick4/bin/convert data/test.jpg data/small.png"; // works fine
$cmd = "/opt/RZmagick4/bin/convert data/test.jpg -resize 300x200 data/small.jpg"; // does not work
exec($cmd, $output);
echo "<pre>";
print_r($output);
echo "</pre>";
Why does the second $cmd not work? Output for both is Array( ). However, there is just no output image.
You should write this:
$cmd = "/opt/RZmagick4/bin/convert -resize 300x200 data/test.jpg data/small.jpg";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With