TImage32.Grayscale

procedure Grayscale;


Grayscale only changes color channels. The alpha channel remains untouched.

1
2
3
4
5
6
7
uses Img32, Img32.Fmt.PNG;
...
img := TImage32.Create;
img.LoadFromFile('lenna.png');
img.Grayscale;
img.SaveToFile('lenna_gray.png');
img.Free;
Before:
After:

See Also

SetRGB