Registriert seit: 18. Nov 2017
135 Beiträge
Delphi 12 Athens
|
AW: Text auf ein Foto speichern
14. Aug 2018, 11:59
Hallo,
so geht es auch:
Delphi-Quellcode:
procedure TForm2.TextToPicture;
var
jp: TJPEGImage; //in der uses Anweidung Vcl.Imaging.Jpeg hinzufügen!
//Für D7 muss nur Jpeg hinzugefügt werden
begin
jp:=TJPEGImage.Create;
jp.LoadFromFile(' C:\Users\...\Pictures\Bild1.JPG');
Image1.Picture.Bitmap.Assign(jp);
Image1.Picture.Bitmap.Canvas.TextOut(10,10,' Hallo');
jp.Assign(Image1.Picture.Bitmap);
jp.SaveToFile(' C:\Users\..\Pictures\Bild2.JPG');
jp.Free;
end;
Geändert von ghubi01 (14. Aug 2018 um 12:05 Uhr)
|