#46751 [Com]: imagepng causes zlib error when quality param is given
ID: 46751
Comment by: j-pieper at gmx dot net
Reported By: j-pieper at gmx dot net
Status: Open
Bug Type: GD related
Operating System: Windows Vista SP1
PHP Version: 5.2.6
New Comment:
Please ignore my white background (expected result). I removed setting
background before posting because it is irrelevant for this issue.
Previous Comments:
------------------------------------------------------------------------
[2008-12-04 19:18:07] j-pieper at gmx dot net
Description:
------------
I wanted to create png image with imagepng(). It works fine but when I
add third parameter (int $quality) it causes an zlib error.
Reproduce code:
---------------
<?php
$image = imagecreatetruecolor(50, 50);
imagepng($image, null, 100);
Expected result:
----------------
50x50px image with white background
Actual result:
--------------
Warning: imagepng() [function.imagepng]: gd-png: fatal libpng error:
zlib error in C:\var\www\laboratory\star\example.php on line 4
Warning: imagepng() [function.imagepng]: gd-png error: setjmp returns
error condition in C:\var\www\laboratory\star\example.php on line 4
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46751&edit=1
Thread (3 messages)