I have now tried this approach:
procedure TMainForm.ButtonCopyClick(Sender: TObject);
begin
// Save IEBitmap to MemoryStream as PNG:
var MemoryStream := TMemoryStream.Create;
try
ImageEnView1.IEBitmap.Write(MemoryStream, ioPNG);
MemoryStream.Position := 0;
// Load MemoryStream into TPngImage:
var Png := Vcl.Imaging.pngimage.TPngImage.Create;
try
Png.LoadFromStream(MemoryStream);
// Copy PNG to clipboard:
Clipboard.Assign(Png);
finally
Png.Free;
end;
finally
MemoryStream.Free;
end;
end;
But it does not work - the image pasted from the clipboard has no transparency: