ID: 30942 Updated by: [EMAIL PROTECTED] Reported By: hkh at netnords dot dk -Status: Open +Status: Assigned Bug Type: GD related Operating System: win XP PHP Version: 4.3.8 Assigned To: pajoye New Comment:
The fact is you will not be able to read these images without using another libpng (1.0.6 and later), compiled with: #define PNG_SETJMP_NOT_SUPPORTED #define PNG_ABORT() The png files are not valid. The fix will be to change the error to a warning and return false. --Pierre Previous Comments: ------------------------------------------------------------------------ [2004-12-02 12:01:05] hkh at netnords dot dk http://www.hanskejserhansen.dk/png/ I don't have the original pictures. They was saved from a homepage via a browser (Don't know witch because i use four different) to my harddesk. I tried to find the original pictures, but now they are jpg's not bmp's. sorry. ------------------------------------------------------------------------ [2004-12-02 11:35:38] [EMAIL PROTECTED] Please provide an url with these images please (if possible both bmp and png). --Pierre ------------------------------------------------------------------------ [2004-12-02 11:19:31] hkh at netnords dot dk I found out witch pictures, who gives this error. It's png's created with acdsee (used to convert bmp's to png's). I have experinced no trouble with these png's in other programs. I also found out, some of the png's gives a <b>Fatal error</b>: imagecreatefrompng(): gd-png: fatal libpng error: Too many IDAT's found Run a phpinfo() who tells me GD Version bundled (2.0.23 compatible) The ini file contains this extension=php_gd2.dll ------------------------------------------------------------------------ [2004-11-30 13:49:53] [EMAIL PROTECTED] Are you using the bundled gd library ("configure --with-gd" and not --with-gd=/path/to/gd). Cannot reproduce it with all branches and 4.3.8. --Pierre ------------------------------------------------------------------------ [2004-11-30 13:20:51] hkh at netnords dot dk Description: ------------ Sometimes when calling imageCreateFromPng() it produces a fatal error instead of returning an empty string. Reproduce code: --------------- /* * The code are placed inside this function * &getImage($IfilePathName) */ return imageCreateFromPng($IfilePathName); Expected result: ---------------- An empty string. After the documentation the function should return a resource on succes, and on error an empty string. Actual result: -------------- <b>Fatal error</b>: imagecreatefrompng(): gd-png: fatal libpng error: Invalid chunk length. in <b> C:\Documents and Settings\hkh\Desktop\php\desktop\bmpNoget.inc.php</b> on line <b>98</b><br /> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30942&edit=1