Hallo,
ich habe eine TImage Objekt, dort hinein lade ich ein JPEG mit Image.Picture.LoadFormFile('test.jpg'), anschließend würde ich gern einen Text auf das Bild schreiben und habe folgende
2 Möglichkeiten getestet.
Delphi-Quellcode:
With Image1.Canvas do begin
Font.Name := 'Arial';
Font.Size := 12;
Font.Color := clRed;
TextOut(10, 10, 'TEST - XXXXXXXXXX');
end;
Diese Möglichkeit schlägt fehl da es sich nicht um ein "Bitmap" handelt.
Delphi-Quellcode:
With Image1.Picture.Bitmap.Canvas do begin
Font.Name := 'Arial';
Font.Size := 12;
Font.Color := clRed;
TextOut(10, 10, 'TEST - XXXXXXXXXX');
end;
Bei dieser Möglichkeit kommt zwar keine
Exception, sondern das Bild verschwindet man sieht
nur das leere Formular und der Text ist schonmal gar nicht zu sehen.
Ich bin etwas ratlos .. ich hoffe jemand hat einen Tipp oder eine Idee für mich.
mfg
TUX