GoogleChromeLabs / squoosh

Make images smaller using best-in-class codecs, right in the browser.
https://squoosh.app
Apache License 2.0
21.7k stars 1.52k forks source link

Add colors count near reduce pallete #433

Open goyuix opened 5 years ago

goyuix commented 5 years ago

It would be helpful to see the count of colors in the source image when reducing the pallete, and when checking the box to reduce pallete to default it to the same number of colors in the source image.

jakearchibald commented 5 years ago

Can you provide some more detail? I understand the feature, but why would this be useful?

goyuix commented 5 years ago

I find myself often using it for PNG images that already have less than 256 colors. If the slider would default to the number of colors in the source image I wouldn't have to guess or look up another way what would be likely be the optimal number of colors in the final palette. I might choose to further reduce it for additional gains, but it would give me a great starting point.

I guess displaying the color count itself isn't that useful, maybe as a curiosity/comparison point between source and final if the palette is being reduced. Defaulting to the color count in the reduce palette slider would (generally) lead to smaller image sizes without the guesswork.