![]() |
Komplette Imagelist abspeichern?
Hallo!
Kann ich eigentlich eine komplette Imagelist abspeichern? Oder kann man vielleicht mehrere Images in eine Datei speichern? Max |
Re: Komplette Imagelist abspeichern?
hi max mir fällt nix besseres ein als das so zu machen
Code:
procedure BilchenAufPlatte;
var image1: TBitMap; i: integer; begin image1 := TBitMap.Create; for i := 0 to ImageList1.Count - 1 do begin ImageList1.GetBitmap(i, Image1); image1.SaveToFile('c:\bildchen' + inttostr(i) + '.bmp'); end; image1.Free; end; |
Re: Komplette Imagelist abspeichern?
also das möchte ich gerade nicht. ich möchte in eine datei viele bilder abspeichern und die dann auch alle wieder laden können!
|
Re: Komplette Imagelist abspeichern?
achso alle auf einmal in eine bitmap wie bei dem entwurfszeiteditor mit der
funktion "exportieren"
Code:
procedure TForm1.SaveImageListasBitMap(MyImageList: TImageList; const sOutputFile: string);
var Bmp : TBitmap; i : Integer; begin Bmp := TBitmap.Create; try Bmp.Width := MyImageList.Width*ImageList1.Count; Bmp.Height := MyImageList.Height; with Bmp.Canvas do begin Brush.Color := clOlive; Brush.Style := bsSolid; FillRect(ClipRect); end; for i := 0 to MyImageList.Count-1 do MyImageList.Draw(Bmp.Canvas, i*MyImageList.Width, 0, i); Bmp.SaveToFile(sOutputFile); finally Bmp.Free end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:13 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