![]() |
tbitmap kann nur bmp
hallo erstmal.
wie lade ich denn z.b. jpegs in ein tbitmap wenn das geht. und wenn nicht bitte eine komponente anbieten, die auch bmp kann. wie man meinem programm ![]() bitte um hilfe :pale: |
Re: tbitmap kann nur bmp
Installier Dir die JVCL ;)
|
Re: tbitmap kann nur bmp
Musst du gar nicht!
Delphi-Quellcode:
Edit:
jpeg:=TJPEGImage.Create;
try jpeg.LoadFromFile(Filename); bmp:=TBitmap.Create; try bmp.Assign(jpeg); bmp.SaveToFile('blabla.bmp')); finally bmp.free; end; finally jpeg.free; end; Oops falsch herum :lol:
Delphi-Quellcode:
uses jpeg;
... Jpg:=TJpegImage.Create; try Jpg.CompressionQuality:=88; Jpg.Assign(bmp2); Jpg.SaveToFile('deinjpeg.jpg'); finally jpg.free; |
Re: tbitmap kann nur bmp
Wenn es Dir nur um das Laden der anderen Format geht, würde ich Dir die Unit "GraphicEx" empfehlen:
![]() |
Re: tbitmap kann nur bmp
Oder die Unit GIFImage, ich hab nur leider gerade keinen Link parat.
|
Re: tbitmap kann nur bmp
Zitat:
Ansonsten: Danke, ich seh mal wie es klappt ;-) |
Re: tbitmap kann nur bmp
Eine TBitmap kann wirklich nur BMP. Man braucht ein TPicture um verschiedene Formate handhaben zu koennen.
Aus der Delphi-Hilfe: "TPicture is a TGraphic container, used to hold a graphic, the type of which is specified in the Graphic property. It is used in place of a TGraphic if the graphic can be of any TGraphic class. LoadFromFile and SaveToFile are polymorphic." TGraphic-Formate kann man nachinstallieren. Die JVCL macht das z. B. fuer .ani-Cursors und fuer .gif. |
Re: tbitmap kann nur bmp
Zitat:
|
Re: tbitmap kann nur bmp
Zitat:
|
Re: tbitmap kann nur bmp
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:37 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