AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Probleme mit der ImageList

Ein Thema von bernhard_LA · begonnen am 29. Feb 2016 · letzter Beitrag vom 29. Feb 2016
Antwort Antwort
bernhard_LA

Registriert seit: 8. Jun 2009
Ort: Bayern
1.123 Beiträge
 
Delphi 11 Alexandria
 
#1

Probleme mit der ImageList

  Alt 29. Feb 2016, 08:38
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;
  Mit Zitat antworten Zitat
Benutzerbild von Uwe Raabe
Uwe Raabe

Registriert seit: 20. Jan 2006
Ort: Lübbecke
11.012 Beiträge
 
Delphi 12 Athens
 
#2

AW: Probleme mit der ImageList

  Alt 29. Feb 2016, 09:24
Und wenn du statt ObjectIndex die Variable I verwendest?
Uwe Raabe
Certified Delphi Master Developer
Embarcadero MVP
Blog: The Art of Delphi Programming
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:58 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz