"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 )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
  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/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to