#21668 [Opn->Bgs]: imagecolorexact etc. not working for 8-bit paletted png
| From: | iliaa@php.net | Date: | Wed, 15 Jan 2003 18:34:09 +0000 |
| Subject: | #21668 [Opn->Bgs]: imagecolorexact etc. not working for 8-bit paletted png | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-30147@lists.php.net to get a copy of this message | ||
ID: 21668
Updated by: iliaa@php.net
Reported By: phpbugs@dronkert.net
-Status: Open
+Status: Bogus
Bug Type: *Graphics related
Operating System: Win32 / OSF1
PHP Version: 4.2.3
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
According to my tests that image only contains 3 colors:
255,255,255
0, 0, 0
204, 204, 204
There is definately no 0,0,153 color.
Previous Comments:
------------------------------------------------------------------------
[2003-01-15 11:49:31] phpbugs@dronkert.net
I created an 8-bit paletted png image using PHP, allocating the
complete webpalet 51*(r,g,b) with r,g,b in [0,5]. See
http://www.phys.uu.nl/~varsity/rowperfect/
- env.php only contains phpinfo().
- grid.php creates "grid.png" in the png subdir.
- test.php tries to analyze the colour palette.
As you can see the colour (0,0,153) definitely exists in the palette
and has index number 212. However, when searching for this colour
imagecolorexact() does not return a valid index value (-1) and
imagecolorclosest() returns the highest index number (215) which is
black (0,0,0). Even worse is imagecolorresolve(): it evidently picks
another index (214) and just replaces the existing colour at that
position with (0,0,153).
The behaviour is exactly the same on this webserver (OSF1, Apache
1.3.27, PHP 4.2.3, GD 1.8.4) as on my home system (Win2k, Apache
2.0.43, PHP 4.3.0-dev, GD 2 built-in). The png image
(http://www.phys.uu.nl/~varsity/rowperfect/png/grid.png) renders
faultless in IE6, Moz121, Corel Photopaint 9. If you want I can send
the grid.php/test.php source.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21668&edit=1