![]() |
TCanvas in JPEG-Datei speichern
hi ihr,
ich versuche grad, den inhalt eines TCanvas in einem jpeg-bild abzuspeichern. aber irgendwie bekomme ich das grad nicht hin. mein code:
Delphi-Quellcode:
mit loggraph1.CopyCanvasTo(temp.Picture.Bitmap.Canvas) ; kopiere ich einen graphen auf ein canvas. und genau den inhalt dieses canvas möchte ich irgendwie in eine jpeg-datei speichern.
var temp: TImage;
begin temp := TImage.Create(self); try temp.Width := 289; temp.height := 73; loggraph1.CopyCanvasTo(temp.Picture.Bitmap.Canvas); //beschreibung siehe unten userstats.Assign(temp.Picture.Graphic); userstats.SaveToFile(extractfilepath(paramstr(0))+'users.jpg'); finally temp.free; end; könnt ihr mir helfen? danke schonmal, Aenogym |
Re: TCanvas in JPEG-Datei speichern
Erst den Canvas in ein TBitmap kopieren und dann in ein JPG umwandeln.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:50 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz