TImage32.SetRGB

procedure SetRGB(rgbColor: TColor32);


Changes every pixel in the image to 'rgbColor' while leaving the Alpha channel untouched.


  uses Img32, Img32.Fmt.PNG;
  ...
  var 
    img: TImage32;
  begin
    img := TImage32.Create;
    img.LoadFromFile('beetle.png');
    img.SetRGB(clMaroon32);
    img.SaveToFile('beetle_mono.png');    
    img.Free;
    

See Also

ConvertToBoolMask, Grayscale