Posted on Oct 10, 2006
(permalink)
Hi Todd,
It is relatively straightforward to create the histogram for an arbitrary image type, but it works best for GIF files. Fortunately, GIFs are what most of our clients upload , so it works fairly well in our situation.
As for images with gradients, I had planned to address that once I found a colour-picker, so I could actually deploy it :). I haven't looked at it closely, but I assume the algorithm would try to group colours into "hills" and select the colours that are closest to the peaks. (The suggestion has been made to take the histogram by converting a JPG to GIF first, but in practice, this didn't work very well.) But even if we restrict its use to GIFs, it will be an advance for us.
The code I have for this is only of proof-of-concept/alpha quality yet (and not very efficient), but if we go ahead and develop it further it I'd be happy to contribute it.
-Mike
> That
sounds like a neat idea. Have you already figured out how to do the
histogram part? I'd be curious to see how well a histogram could
discern the key colors in a logo, especially if the user has a logo
with gradients.