imagick raises error
| From: | vuthecuong | Date: | Fri, 19 Dec 2008 10:15:28 +0000 |
| Subject: | imagick raises error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-284820@lists.php.net to get a copy of this message | ||
Hi,
Currently I'm reading below page:
http://www.imagemagick.org/Usage/api/#php
When I tried imagick example of it, php raised error about function :
Imagick::readimage() .
Fatal error: Non-static method Imagick::readimage() cannot be called
statically in /usr/local/www/apache22/data/php/im/imagick_hello.php on line
2
I don't know what is the cause. How can I solve this?
I'm running latest IM 6.4.7 with imagick 2.2.1, php 5.2.8 in Freebsd 7.0,
all built from ports.
Thanks and regards,
below is whole example of above site:
<?php
$handle = imagick_readimage( getcwd() . "image.jpg" );
if ( imagick_iserror( $handle ) ) {
$reason = imagick_failedreason( $handle ) ;
$description = imagick_faileddescription( $handle ) ;
print "Handle Read failed!<BR>\n";
print "Reason: $reason<BR>\n";
print "Description: $description<BR>\n";
exit ;
}
header( "Content-type: " . imagick_getmimetype( $handle ) );
print imagick_image2blob( $handle );
?>
--
View this message in context: http://www.nabble.com/imagick-raises-error-tp21088873p21088873.html
Sent from the PHP - General mailing list archive at Nabble.com.