T O P I C R E V I E W |
HMArnold |
Posted - Jul 10 2023 : 12:23:20 Is there a way to read how many pixels exist for each color in a palette?
I'm pretty sure I'm just not using the correct search terms, but I can't find anything about it.
GetDominantColor gets the most used color, but is there a way to scan the pixels counts down the entire Palette?
A solution is a brute force scan of each pixel by row/column and adding the colors encountered, but I'm hoping there is a faster way to get the same result using the palette.
|
1 L A T E S T R E P L I E S (Newest First) |
xequte |
Posted - Jul 10 2023 : 18:11:59 Hi
See the overload for GetDominantColor that allows you to get multiple colors in turn:
http://www.imageen.com/help/TImageEnProc.GetDominantColor.html
But if you are trying to do it for all or many colors, then you will get better performance by just iterating over the entire image and building your own color table.
Nigel Xequte Software www.imageen.com
|
|
|