Bug #67325 [NEW]: imagetruecolortopalette: many colors in palette are missing
| From: | icp at freigre dot com | Date: | Thu, 22 May 2014 11:42:23 +0000 |
| Subject: | Bug #67325 [NEW]: imagetruecolortopalette: many colors in palette are missing | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-185893@lists.php.net to get a copy of this message | ||
From: icp at freigre dot com
Operating system:
PHP version: 5.5.12
Package: GD related
Bug Type: Bug
Bug description:imagetruecolortopalette: many colors in palette are missing
Description:
------------
This bug has been already posted 2004 here:
https://bugs.php.net/bug.php?id=28949
But the bug is still alive in PHP 5.5!
I convert a truecolor image with 1000s of different colors into a
palette image using
imagetruecolortopalette ($image, no, 256)
But the palette of the resulting image doesn't contain the 256 most
appearing individual colors of the original truecolor image. Many of the
palette colors are just white (RGB value: #FF FF FF).
For example just 120 colors are individual, the rest of 136 palette
entries is white.
This results in a worse color reproduction of the palette image than it
should be using 256 individual colors.
Please fix this bug, since imagetruecolortopalette is very important for
creating small-filesized GIF and PNG images. Their filesize is
dramatically lower than its truecolor counterpart while retaining
satisfying output quality.
--
Edit bug report at https://bugs.php.net/bug.php?id=67325&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=67325&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=67325&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=67325&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=67325&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=67325&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=67325&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=67325&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=67325&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=67325&r=support
Expected behavior: https://bugs.php.net/fix.php?id=67325&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=67325&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=67325&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=67325&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=67325&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=67325&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=67325&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=67325&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=67325&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=67325&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=67325&r=mysqlcfg