Re: Imagick->setImageFormat()

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

 



On Jan 29, 2009, at 4:20 PM, Philip Thompson wrote:

Hello all.

I'm pretty new to Imagick. I'm merely attempting the examples on the PHP site (http://php.net/manual/en/imagick.examples-1.php), but I'm having some issues. I'm attempting the reflection of an image example and when I attempt to:

$canvas->setImageFormat("png");

I get an error that reads:

Fatal error: Uncaught exception 'ImagickException' in /home/www/pc4/ image.php:67 Stack trace: #0 /home/www/pc4/image.php(67): Imagick- >setimageformat('png') #1 {main} thrown in /home/www/pc4/image.php on line 67

Note that I CAN do this: $canvas->setImageFormat("gif");

I'm running Fedora Core 8. My first thought was that my machine doesn't support PNG. So I checked for libpng, and it's there and up to date. I've looked at my http error logs and I've google'd to no avail. Do you have any thoughts on why I can't use the "png" format?

Thanks in advance,
~Philip

Ok, I figured it out. Along with that error message I was receiving "identify: no decode delegate for this image format" when I attempted to open up a PNG image. Well, after some searching, I discovered that that basically means you don't have the libraries to support that image type. The weird part is, I did have libpng. However, I think I may have installed it after I built ImageMagick. So, I rebuilt ImageMagick. This time I looked at the configuration and png support was enabled. It works now! Yay!

This person was having a similar issue and it helped me figure out what I need to know:
http://www.vbulletin.com/forum/archive/index.php/t-197439.html

Also, directions for installing ImageMagick from source:
http://www.imagemagick.org/script/install-source.php

Cheers!
~Philip

--
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