Hi Nigel, unfortunately, this code did not work for me. (Compiler complained: Wrong overload for LayersAdd). This code did compile:
with DragDropForm.formDragDrop.imgCoverDrag do
begin
LayersAdd( 'DROP ME', 32, clRed, 'Arial Black', [fsBold], IELayer_Pos_HCenter, IELayer_Pos_VCenter);
TIETextLayer( CurrentLayer ).SizeToText();
CurrentLayer.PosX := IELayer_Pos_HCenter;
CurrentLayer.PosY := IELayer_Pos_VCenter;
CurrentLayer.FillColor := clWhite;
CurrentLayer.BorderColor := clNone;
// Note: use Transparency if the image does not have an alpha channel
CurrentLayer.Opacity := 0.7;
LayersMergeAll();
end;
However, it makes the image smaller! And the text is not positioned in the center of the image!