php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59263 imagick reports png-files always as corrupt
Submitted: 2010-06-16 07:40 UTC Modified: 2010-07-12 12:49 UTC
From: mb at lunetics dot com Assigned:
Status: Closed Package: imagick (PECL)
PHP Version: 5.2.11 OS: Freebsd 7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mb at lunetics dot com
New email:
PHP Version: OS:

 

 [2010-06-16 07:40 UTC] mb at lunetics dot com
Description:
------------
using:

libpng 1.4.1
ImageMagick 6.6.1.10

Command Line 'identify' works as expected:

identify png1.png
png1.png PNG 800x415 800x415+0+0 8-bit DirectClass 146KB 0.008u 0:00.046

As soon as i want to read a PNG image, php reports "corrupt image"


Reproduce code:
---------------
php -r 'ini_set('display_errors', true);$im = new Imagick(); $im->readImage("png1.png"); var_dump($im->getImageFormat());'

Actual result:
--------------
Fatal error: Uncaught exception 'ImagickException' with message 'corrupt image `/var/tmp/magick-pcDhdcxq' @ error/png.c/ReadPNGImage/3052' in Command line code:1
Stack trace:
#0 Command line code(1): Imagick->readimage('png1.png')
#1 {main}
  thrown in Command line code on line 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-12 09:28 UTC] mkoppanen@php.net
What does identify -verbose give ?
 [2010-07-12 12:49 UTC] mb at lunetics dot com
Reinstalling all Packages recursive did the trick.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 05:01:33 2025 UTC