самый простой способ - перебор, может есть и другие
Код:
function ColorCount(const Pic: TImage; const Color: TColor): Integer;
var
i, j: Integer;
begin
Result:=0;
for i:=1 to Pic.Width do
for j:=1 to Pic.Height do
if Pic.Canvas.Pixels[i][j] = Color then
Inc(Result);
end;
зы. не проверял
|