#46751 [Com]: imagepng causes zlib error when quality param is given

From: Date: Thu, 04 Dec 2008 19:34:24 +0000
Subject: #46751 [Com]: imagepng causes zlib error when quality param is given
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131602@lists.php.net to get a copy of this message
 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)

« previous php.bugs (#131602) next »