grafic function ttg_rgb2gray()

T&T Grafic function ttg_rgb2gray

If you have a colored image, this function can turn it into grayscale (Red, Green and Blue intensity are equal). There are quite a few algorithms described to recon a gray value from color intensities (Red, Green, Blue). Tool&Task currently offers three procedures:

methodfunction
AV -> AverageGray = int((Red + Green + Blue) / 3)
LI -> LightnessGray = int((max(Red, Green, Blue) + min(Red, Green, Blue)) /2)
LU -> LuminosityGray = int(0.21 * Red + 0.72 * Green + 0.07 * Blue)

Parameters:

1. Source Bitmap (RGB)
2. Target Bitmap (Grayscale)
3. Method