I currently use this code to add a "PAID" stamp to a TIEBitmap:
procedure AddPaidStampToBitmap(Bmp: TIEBitmap);
var
TempImageEnView: TImageEnView;
begin
// Create a temporary TImageEnView to handle layers:
TempImageEnView := TImageEnView.Create(nil);
try
// Load the bitmap into TImageEnView:
TempImageEnView.IEBitmap.Assign(Bmp); // Copy TIEBitmap content to TImageEnView
// Apply a "Paid" stamp to the image:
with TempImageEnView do
begin
LayersAdd('PAID', 48, clRed, 'Arial Black', [fsBold]);
CurrentLayer.Rotate := 30;
TIETextLayer(CurrentLayer).SizeToText();
CurrentLayer.PosX := IELayer_Pos_HCenter;
CurrentLayer.PosY := IELayer_Pos_VCenter;
LayersMergeAll();
end;
// Copy the result back to the original TIEBitmap:
Bmp.Assign(TempImageEnView.IEBitmap);
finally
TempImageEnView.Free;
end;
end;
Is it possible to do this with the TIEBitmap directly without using the temporary TImageEnView?