procedure Grayscale;
Grayscale only changes color channels. The alpha channel remains untouched.
uses Img32, Img32.Fmt.PNG;
...
img := TImage32.Create;
img.LoadFromFile('lenna.png');
img.Grayscale;
img.SaveToFile('lenna_gray.png');
img.Free;
After:
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 16 Apr 2025