Consider :
Image1.Picture.LoadFromFile('pink_bars.png');
black := TPngImage.Create();
black.LoadFromFile('black.png');
(Image1.Picture.Graphic as TPngImage).Canvas.Draw(0, 0, black);
(Image1.Picture.Graphic as TPngImage).Modified := True;
Here, the contents of black.png
won’t appear where pink_bars.png
has transparency. Which makes sense of course, but in this case I’d like the transparency info of black.png
to be kept in the final result (for the portion of the image it is drawn upon, here it doesn’t cover it all). I’m not sure of how I could do that short of overriding information in a loop pixel by pixel, manually.