[magick-users] PHP/Imagick/Ubuntu7.02 Problem:
Anthony Thyssen
anthony at griffith.edu.au
Thu Aug 30 16:08:08 PDT 2007
"Prasad Burra" on wrote...
| Dear all,
|
| I am trying to use PHP-Imagick combination. Just started, so it is a
| newbie question.
|
| I installed php-imagick using apt-get install php-imagick
|
| I copied the example script:
| ***********************************
| <?php
| header('Content-type: image/jpeg');
| $image = new Imagick('image.jpg');
| $image->thumbnailImage(100, 0);
| echo $image;
| ?>
| ***************************************
|
| Provided the 'image.jpg' file.
| When I run this script: I am getting following error:
| *****************************************************************
| Warning: Cannot modify header information - headers already sent by
| (output started at /var/www/imagic.php:5) in /var/www/imagic.php on
| line 6
|
| Fatal error: Class 'Imagick' not found in /var/www/imagic.php on line 7
| ******************************************************************************
|
| What is that I am missing in the configuration / installation of
| imagick with php.
| could some body help me.
You script should not try to echo the image structure directly.
It is NOT the image but the data for the image.
See IM Examples, API and scripting, PHP
http://www.imagemagick.org/Usage/
Replace the echo with
print imagick_image2blob($image);
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
Q: How many tech support people does it take to change a light bulb?
A: We have an exact copy of the light bulb here and it seems to be
working fine. Can you tell me what kind of system you have? Okay,
just exactly how dark is it? Okay. There could be four or five
things wrong. Have you tried the light switch?
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list