Page 1 of 1

MagickWand for PHP; anything wrong with my code?

Posted: 2007-08-03T13:40:26-07:00
by ridera
Ii can't figure out if MagickWand for PHP is broken or if there is something wrong with my code.
IM version 6.3.5; MW 1.0.4 PHP 5.2.3

Code: Select all

$resource = NewMagickWand();
	$dwand = NewDrawingWand();
	$pwand = NewPixelWand();
	$org_image= 'flower_original.jpg';

	header('Content-Type: image/jpeg');

// convert flower_original.jpg -resize 640×480 flower.jpg
	MagickReadImage( $resource, $org_image );

	MagickEchoImageBlob( $resource );

	MagickResizeImage( $resource, 100, 100, MW_QuadraticFilter, 1.0 );

	MagickEchoImageBlob( $resource );

Re: MagickWand for PHP; anything wrong with my code?

Posted: 2007-08-12T22:01:46-07:00
by anthony
I suggest you add some error return checks. More than likely it can not find or read the image.