![]() |
TImage: Image als BMP, JPG, WMF, ICO, etc. speichern
Hallo,
ich habe in einem Image ein Bild und möchte dies nun speichern. Mit
Code:
kann ich ja das Picture als Bmp speichern, aber wie kann ich es als Jpg, wmf, ico, usw. speichern?
Image1.Picture.SaveToFile();
|
Re: TImage: Image als BMP, JPG, WMF, ICO, etc. speichern
Du musst das Bild vorher in das richtige Grafikformat konvertieren.
Wenn du z.B. als JPEG speichern willst:
Delphi-Quellcode:
Die Suchfunktion hilft dir für die anderenbestimmt weiter.
with TJpegImage.Create do try
Assign(Image1.Picture.Graphic); SaveToFile('C:\Test.jpg'); finally Free; end; |
Re: TImage: Image als BMP, JPG, WMF, ICO, etc. speichern
Für die Icons und die Metafiles müsste es doch auch gehen, da diese eigene Property haben. (z.B. Image1.Picture.Icon usw.)
Dabei muss man aber je nach Typ des Bildes (BMP, ICO, WMF/EMF) unterscheiden, welche man nimmt. MfG Binärbaum |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:21 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