BlendToOpaque

function BlendToOpaque(bgColor, fgColor: TColor32): TColor32;

A callback function that can be passed as a parameter to the TImage32.CopyBlend method. This function blends a semi-transparent image onto an opaque background. (If the background image also has some transparency, then the BlendToAlpha callback function should be used.)

uses Image32, Image32_PNG;
...
img := TImage32.Create;
img.LoadFromFile('fruit.png');
img2 := TImage32.Create;
img2.LoadFromFile('beetle.png');
img2.Resize(20,20);
img.CopyBlend(img2, img2.Bounds, 
  Rect(100,100,120,120), BlendToOpaque);
img.SaveToFile('beetle_on_fruit.png');
img.Free;
img2.Free;
      
Before:
 
After:

See Also

TImage32.CopyBlend, BlendToAlpha