ImageMagick/PHP Resizing Issue: Image Wont Resize, but ImageMagick is installed -
i having odd issue imagemagick.
in same script, have following code:
$ct = system("convert -version"); echo $ct; and displays following response:
version: imagemagick 6.6.0-4 2012-04-26 q16 http://www.imagemagick.org copyright: copyright (c) 1999-2010 imagemagick studio llc features: openmp however, when attempt this:
$ct2 = system("convert -resize 800x600 test-image.jpg test-image2.jpg", $retval); echo $retval; it returns 1, image not resized. shouldn't second image created, resized, under file name "test-image2.jpg"? checked directory permissions, , they're set 0777, shouldn't issue. idea going on here?
a return code of 1 considered error. 0 means "no error occurred".
i think because have arguments in wrong order. imagemagick wants input file, bunch of operations , output file. try switch order on arguments:
convert test-image.jpg -resize 800x600 test-image2.jpg a idea check out imagick extension php. gives object-oriented interface of imagemagick functions.
Comments
Post a Comment