MagickWand for PHP does not produce any outputs
Posted: 2007-08-06T08:14:39-07:00
MagickWand for PHP goes thru the motions; but, doesn't produce any outputs, no echo blobs, write files, or even reporting the width and height.
e.g., Here is a very simple example. The width and height are empty. flower_original.jpg is legit, It works fine with the old PHP imagemagick functions and it is a good jpeg.
Both exception strings are empty. However, if I force an error, e.g., name the image to a non existing file, I get
PHP5.2.3; MagickWand 1.0.4; ImageMagick 6.3.5 08/04/07 Q16
e.g., Here is a very simple example. The width and height are empty. flower_original.jpg is legit, It works fine with the old PHP imagemagick functions and it is a good jpeg.
Code: Select all
$resource = NewMagickWand();
$org_image= getcwd() . '/flower_original.jpg'; //also tried without full path;
//Simple test to see if generally working
MagickReadImage( $resource, $org_image);
echo 'Error report 1 => ' . MagickGetExceptionString($resource) . "<br><br>\n\n";
$width = MagickGetImageWidth( $resource );
$height = MagickGetImageHeight( $resource );
echo 'Error report 2 => ' . MagickGetExceptionString($resource) . "<br><br>\n\n";
echo "Image size, in pixels, is: width $width x height $height <br><br>\n\n";
Code: Select all
Error report 1 => unable to open image `/home/ridera/public_html/imagemagick/xflower_original.jpg': No such file or directory
Error report 2 => Wand contains no images `MagickWand-2'