Getting this error?
PHP Fatal error: imagepng() [function.imagepng]: gd-png: fatal libpng error: zlib error in example.php on line 10
Fix it easily by changing your compression variable of imagepng, imagegif or imagejpg/imagejpeg into a 1-10 ranged number – instead of the PHP 4 1-100 standard.
It should work smoothly now :)
It works like heaven. Thank you.
Yes…the solution works. Had the same problem while migrating from php4 to php5
thanks dude … my code works nicely now!
YES! thanks dude!
David Barnes —
Actually, 10 causes this error too. Set it to 9 to fix this problem.
Hey Jamie, thanks for taking the time to post this. You came up quite high on Google for this error message. Within less than a minute of encountering it in a project I’m working on, I was able to remedy it, thanks to your post.
Hey, thx.. i used 7 and its works fine ^^
Works with values 0-9.
Thanks for the fix! Tried it with 9 (after it not working with 10) and it worked like a charm. Gotta love easy solutions! Thanks again!
Thank you so much! This one problem took two days of my life away :/
Thank you for posting this, you’re a life saver!
Warning: imagepng() [function.imagepng]: gd-png: fatal libpng error: zlib error « Leonel Santos