Autor Beitrag
Niko S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 566
Erhaltene Danke: 10

Win 7, Ubuntu
Lazarus, Turbo Delphi, Delphu 7 PE
BeitragVerfasst: Sa 20.01.07 18:20 
Also Ich wollte ja etwas zum laufen bringen ^^ also hab ich n image genommen und n timer und alle 100 millisekunden läd der ein bild..
Gut nun weis ich ja das das ziemlich ram/speicher lastig is ... auch wenns nur 4 bilder sind das ständige laden muss nicht sein.
Da dacht ich mir Probiere ich ImageList aus nun ist das problem das die eingelesenen images in der Imagelist nicht Korrekt übertragen werden.
Da bleiben entweder weiße rückstände oder wenn ich die feiltaste nicht gedrückt halte bewegt der sich gar nicht.. also irgendwas haut da nicht ganz hin
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.animrightTimer(Sender: TObject);
begin
  try
  Imagelist1.GetBitmap(i,image1.Picture.Bitmap);
  i := i+1;
  except
  end;
  if (i >= 3) then i:= 0;
end;

Joah wenn ich das so mache:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.animrightTimer(Sender: TObject);
begin
  i := i+1;
  try
  Image1.Picture.LoadFromFile(ExtractFilePath(application.exename)+inttostr(i)+'.bmp');
  except
  end;
  if (i >= 4) then i:= 0;
end;

Funktioniert es einwandfrei...
(Image1.Transparent := True;)
Weiß einer rat?
Coder
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1383
Erhaltene Danke: 1

WinXP
D2005 PE
BeitragVerfasst: Sa 20.01.07 19:33 
Experimentier mal mit den Einstellungen der ImageList rum.
Z.B. DrawingStyle auf dsTransparent.

MfG
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Sa 20.01.07 19:37 
Hi Simak,

probier mal:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.animrightTimer(Sender: TObject);
begin
  try
  Imagelist1.GetBitmap(i,image1.Picture.Bitmap);
  Image1.Refresh;
  INC(i);
  except
  end;
  if (i >= 3) then i:= 0;
end;


Gruß

Saubäär
Niko S. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 566
Erhaltene Danke: 10

Win 7, Ubuntu
Lazarus, Turbo Delphi, Delphu 7 PE
BeitragVerfasst: Sa 20.01.07 20:03 
Oke das Funktioneirt soweit.
Das nächste Problem ist nun das die Maske noch da ist ... (unzwar immer vom ersten bild ..)
Und die anderen bilder sehen ja anders aus also seh ich sie nicht richtig.
Ich hab masked schon auf False gestellt will aber immernoch nicht wirklich :(
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Sa 20.01.07 21:02 
Probiers mal So.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.animrightTimer(Sender: TObject);
begin
  Image1.Picture:=Nil;
  Imagelist1.GetBitmap(i,image1.Picture.Bitmap);
  INC(i);
  if (i >= 3) then i:= 0;
  end;
end;

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
Niko S. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 566
Erhaltene Danke: 10

Win 7, Ubuntu
Lazarus, Turbo Delphi, Delphu 7 PE
BeitragVerfasst: Sa 20.01.07 22:17 
Thx Das hat geholfen.
Noch eine Frage :
Die ImageList tut doch alle geaddeten files extra speichern stimmts?
Muss ich das denn beim programm schleißen auch wieder leeren?