Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi animiertes Gif Problem (https://www.delphipraxis.net/130192-animiertes-gif-problem.html)

thomas2009 4. Mär 2009 23:42


animiertes Gif Problem
 
Hallo

ich habe ein Problem mit gif Bild
Wenn ich das Gif-Bild direkt von einem Ordner lade dann gehlt.
Delphi-Quellcode:
Image1.Picture.LoadFromFile('animation1.gif');
Aber wenn ich das Bild von Resource lade, dann sehe ich keine Animation. das Bild bleibt stehen
Delphi-Quellcode:
var
  Res : TResourceStream;
  Bild : TGIFImage;
begin
  Res := TResourceStream.Create(Hinstance, 'animation1.gif', PChar('BMP'));
  Bild := TGIFImage.Create;
  try
    Bild.LoadFromStream(res);
  finally
    Res.Free;
  end;
  Image1.Picture.Graphic := Bild;
  Bild.Free;

end;

jaenicke 5. Mär 2009 00:37

Re: animiertes Gif Problem
 
Welche TGIFImage Komponente benutzt du denn? Delphi selbst kennt ja bis 2006 keine GIFs. Benutzt du GraphicEx?

alleinherrscher 5. Mär 2009 01:00

Re: animiertes Gif Problem
 
Guck mal nach "TJvGifAnimator", das ist eine Komponente der JEDI VCL, und die kann man sich bekanntlich runterladen und installieren unter: http://sourceforge.net/project/showf...group_id=45786

thomas2009 5. Mär 2009 01:06

Re: animiertes Gif Problem
 
Zitat:

Zitat von jaenicke
Benutzt du GraphicEx?

Ein beispiel ?

thomas2009 5. Mär 2009 01:16

Re: animiertes Gif Problem
 
Zitat:

Zitat von alleinherrscher
Guck mal nach "TJvGifAnimator", das ist eine Komponente der JEDI VCL, und die kann man sich bekanntlich runterladen und installieren unter: http://sourceforge.net/project/showf...group_id=45786

die sind schon installiert, aber wie
ich have versucht ein gif in JvGIFAnimator1, leider bekomme ich immer einen fehler : invalid gif format !

Blup 5. Mär 2009 07:39

Re: animiertes Gif Problem
 
Vermutlich wurde das Bild in der Resource nicht im Gif- sondern im Bmp-Format gespeichert.
Wenn keine Animation gespeichert ist, kann auch keine angezeigt werden.

thomas2009 5. Mär 2009 13:14

Re: animiertes Gif Problem
 
Zitat:

Zitat von Blup
Vermutlich wurde das Bild in der Resource nicht im Gif- sondern im Bmp-Format gespeichert.
Wenn keine Animation gespeichert ist, kann auch keine angezeigt werden.

das spielt keine Rolle ob BMP oder GIF oder eine Zahl sogar. das ist nur eine Adresse so zu sagen
Delphi-Quellcode:
Res := TResourceStream.Create(Hinstance, 'animation1.gif', PChar('BMP'))
// oder
Res := TResourceStream.Create(Hinstance, 'animation1.gif', PChar('GIF'))

DeddyH 5. Mär 2009 13:15

Re: animiertes Gif Problem
 
Es geht darum, in welchem Format die Grafik in der Ressource vorhanden ist. Es scheint kein GIF zu sein, daher die Fehlermeldung.

thomas2009 5. Mär 2009 13:22

Re: animiertes Gif Problem
 
Zitat:

Zitat von DeddyH
Es geht darum, in welchem Format die Grafik in der Ressource vorhanden ist. Es scheint kein GIF zu sein, daher die Fehlermeldung.

Das Bild in Ressource ist natürlich ein animiertes Gif (vorher getestet mit Internet Explorer)
Es erscheint keine Fehlermeldung. Das Bild wird zwar von Ressource geladen aber bleibt stehen als das Bild nur aus einem bild besteht.

DeddyH 5. Mär 2009 13:26

Re: animiertes Gif Problem
 
Hast Du es mal aus der Ressource extrahiert und ausprobiert?


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:27 Uhr.
Seite 1 von 2  1 2      

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