mirror of
https://github.com/php/php-src.git
synced 2026-04-20 14:31:06 +02:00
gdImageTrueColorToPalette() is sometimes wasteful by putting multiple white color entries into the palette. This is caused by an obvious typo, where to avoid a division by zero when `total` is zero, `count` is checked instead of `total`. We fix this issue to improve the quality of the color quantization. Cf. <https://github.com/libgd/libgd/commit/24b4550f>
13 KiB
13 KiB