procedure TForm1.AddLayer1Click(Sender: TObject);
begin
{Add space at the top of the image to hold the text}
ImageEnView1.Proc.ImageResize(0, 30, 0, 0);
{Add a text layer}
ImageEnView1.LayersAdd(ielkText);
{Set the position and dimensions of the layer}
ImageEnView1.Layers[ImageEnView1.LayersCurrent].PosX := 0;
ImageEnView1.Layers[ImageEnView1.LayersCurrent].PosY := 0;
ImageEnView1.Layers[ImageEnView1.LayersCurrent].Width := ImageEnView1.IEBitmap.Width;
ImageEnView1.Layers[ImageEnView1.LayersCurrent].Height := 30;
{Set the layer text}
TIETextLayer(ImageEnView1.CurrentLayer).Text := 'Custom Custom Custom Custom Custom Custom';
{Align the text}
TIETextLayer(ImageEnView1.CurrentLayer).Alignment := iejCenter;
{Set the fill color}
TIETextLayer(ImageEnView1.CurrentLayer).FillColor := clYellow;
{Merge the layers}
ImageEnView1.LayersMergeAll();
ImageEnView1.Update();
end;
As far as saving this with lossless transformation it is not possible. Lossless transformation is only possible with source and destination files and specific lossless transformation procedures - TIEJpegTransform = (jtNone, jtCut, jtHorizFlip, jtVertFlip, jtTranspose, jtTransverse, jtRotate90, jtRotate180, jtRotate270);
Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development