Re: imagick raises error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



vuthecuong schreef:
> 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

it looks like there was a functional interface as well as an OO interface
for imagick ... the functions themselves seem to live on but the underlying
extension only seems to work via OO interface.

the docs only describe an OO interface for imagick extension:

	http://php.net/manual/en/book.imagick.php


see the user notes on this page for an example on how to use the OO
interface:

	http://php.net/manual/en/function.imagick-readimage.php


> 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 );
> ?> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux