ImageEn, unit imageenproc

TImageEnProc.CalcAverageRGB

TImageEnProc.CalcAverageRGB


Declaration


function CalcAverageRGB(iSampleCount : Integer = 0): TRGB;


Description


Returns the average RGB values of the selection.

If iSampleCount < 1 then the entire image is analyzed. To speed up processing you can sample a smaller number of points, e.g. 100


Example


// Fill the selected area with the average color
ImageEnView.Proc.Fill( ImageEnView.Proc.CalcAverageRGB() );