Page 1 of 1

"corrupt image" when trying to create a PNG

Posted: 2011-04-04T11:13:49-07:00
by bradleye
Hi Guys,

Im getting the following error when trying to create a PNG image using Imagick (using PHP).

Code: Select all

Fatal error: Uncaught exception 'ImagickException' with message 'corrupt image `/tmp/magick-uQj1QpOB' @ error/png.c/ReadPNGImage/3134' in /var/www/vhosts/domain.net/httpdocs/classes/main.class.php:475 Stack trace: #0 /var/www/vhosts/domain.net/httpdocs/classes/main.class.php(475): Imagick->__construct('/var/www/vhosts...') #1 /var/www/vhosts/domain.net/httpdocs/admin/classes/admin.class.php(606): Main->MakeThumb('120', '50', '/var/www/vhosts...', '/var/www/vhosts...', 'image/png') #2 /var/www/vhosts/domain.net/httpdocs/admin/editcompany.php(51): Admin->EditCompany() #3 {main} thrown in /var/www/vhosts/domain.net/httpdocs/classes/main.class.php on line 475
Anyone know what causes this and how to resolve?

Thanks,
Bradley

Re: "corrupt image" when trying to create a PNG

Posted: 2011-04-04T16:31:38-07:00
by anthony
The first line is a standard ImageMagick error saying the PNG image it was reading was bad.

The rest is coming from the wrappers around the core library. Looks like PHP IMagick was used by a PHP script.