Imagemagick command line not working
Posted: 2013-08-09T05:00:02-07:00
Hi All
Im new to ImageMagick and just trying to get it working through command line. I did it once so I know it works but then changed the code without saving the page (Silly me!!) and now its no longer working.
Here is my code
The image goes through the command fine and then displays but the image has not be been resized, its just displaying the original image. If I try to find out my version I get this....
Version: ImageMagick 6.8.3-6 2013-03-15 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC Features: DPC OpenMP Modules Delegates: bzlib fontconfig freetype gslib jng jp2 jpeg lcms pango png ps rsvg tiff wmf x xml zlib
Im new to ImageMagick and just trying to get it working through command line. I did it once so I know it works but then changed the code without saving the page (Silly me!!) and now its no longer working.
Here is my code
Code: Select all
$imgDir = "/images/icons";
$IMGMGK = "/usr/bin/convert";
$command = "convert $imgDir/lantech_logo_lge.jpg -resize 64x64 $imgDir/lantech_logo_lge.jpg";
passthru("\"$IMGMGK\" $command", $returnVal);
if ($returnVal > 1) {echo "ERROR";}
else {echo "<img src=\"$imgDir/lantech_logo_lge.jpg\">";}
Version: ImageMagick 6.8.3-6 2013-03-15 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC Features: DPC OpenMP Modules Delegates: bzlib fontconfig freetype gslib jng jp2 jpeg lcms pango png ps rsvg tiff wmf x xml zlib