Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

What's the fastest method for getting a count of unique colors in an image?

$
0
0

Hi all!

 

I'm trying to do a bunch of stuff with indexed color tables, saving to gif, loading the colors in from the gif and going from there... the issue is that gif will pad the color table to powers of 2, so if I only had 5 colors in my image, the color table i'm getting from the gif i've saved will be 8...

 

I'd like to know/determine the number of colors in an image before I do all of the other stuff, but I'm not sure what the fastest way to do this in PS scripting is, and would love any suggestions! The source image will always already be in indexed color if that matters.

 

Thanks!


Viewing all articles
Browse latest Browse all 12244

Trending Articles