Hi Nigel,
Thank you for asking me. GetDominantColor is about ten times faster and the results seem to be the same! I will update the Blog article.
I use this overload:
function GetDominantColor(var DominantColors: array of TColor; Count: Integer): Integer; overload;
However, with this overload returning var DominantColors: array of TColor; from my requirements I need to exclude colors that are DARKER or LIGHTER than a specific value:
function GetDominantColor(
var DominantColors: array of TColor;
Count: Integer;
// luminance or lightness (Byte or Double):
ExcludeColorsDarkerThan: Byte;
ExcludeColorsLighterThan: Byte
): Integer; overload;
Can you implement this overload? Many users will find it very helpful!
Reason: Imagine you analyze this image:
With the current overload I get this huge number of dominant dark colors:
This is the reason I need to exclude dark colors.