-
-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images hold often less colors than requested #90
Comments
I tried with the latest OS X binary (version 2.2.0), on the first image (the colored bubbles):
Both palettes sorted and shown side by side, the colors removed by pngrewrite were not in duplicate, I'll retrieve their original rank and look if they were really missing in the image body.
Based on Huffman header analysis of the PNG produced by pngquant (this works since there's only one Deflate block in the compressed stream and the sole PNG filter used is 0 -none-), these 3 colors are effectively never used in the image:
The same colors are missing in the dithered version of this image:
|
Another test, this time using the Windows version of pngquant available on the main site (version 2.1.1) on the second image (Google logo).
This time pngrewrite removed 8 colors!
On the third image (Donut box):
Weird!? |
It's an interesting bug. Some additional observations, on the Google image.
|
+1 |
Noticed this as well. My use case is an image that's black and transparent and is converted from 256 bit to a 1 bit palette, the 3D engine that it's used in expects 256 bit palette so it breaks. |
I do not expect this to be an issue in v4.0.0. Please file a new bug with example images if you still find problems. |
On various samples even when I ask for 256 colors in the resulting image I get less (down to 248 for some).
Files produced by pngquant apparently have 256 palette entries, but once optimized with pngrewrite, pngout or zopflipng the color count goes often down to 255 or 254 sometimes even less.
Here are some PNG-32 that trigger the problem (see next comment for steps to reproduce it).
The text was updated successfully, but these errors were encountered: