![]() |
Probleme mit der ImageList
ich möchte einzelne Bilder aus meiner ImageList als Bitmap weiterverwenden.
Speichere ich mit der Funktion DebugImageListContent meine ImageListe auf meine Festplatte sind alle Bilder verfügbar, die Anweisung Symbol.SaveToFile liefert mir nur ein leere Bitmaps .... wieso ?
Delphi-Quellcode:
var Symbol: TBitMap;
begin Symbol := TBitMap.Create; ..... .... i := ..... ; /// I [ 0 ... Imagelist Count-1] MyOBJImageList.GetBitmap(i - 1, Symbol); DebugImageListContent (MyOBJImageList, 'c:\temp', 'ObjList'); Symbol.SaveToFile('c:\temp\symbol' + INtToStr(ObjectIndex) + '.bmp'); end; procedure DebugImageListContent (aImageList: TImageList; RootPath, Filename : String); var i : Integer; Fullfilename : String; aImage : TBitMap ; begin for i := 0 to aImageList.Count-1 do begin aImage :=TBitMap.Create; aImageList.GetBitmap( i , aImage ); FullFilename := RootPath + '\' + Filename + IntToStr(i) + '.bmp' ; aImage.SaveToFile(FullFilename); aImage.Free; end; end; |
AW: Probleme mit der ImageList
Und wenn du statt ObjectIndex die Variable I verwendest?
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:27 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