Autor Beitrag
kandesbunzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 116
Erhaltene Danke: 1


Delphi 7, XE2
BeitragVerfasst: Di 29.12.20 12:48 
Hallo,

ich möchte ein animiertes GIF anzeigen/abspielen lassen. Die Einbindung selbst funktioniert, jedoch wird das GIF nicht abgespielt, sondern als statisches Bild angezeigt.

Woran könnte das liegen? Spielt evtl. die Bildgröße eine Rolle?

Danke!
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Di 29.12.20 13:59 
Mit welcher Komponente zeigst du denn das Bild an? TImage kann nur ein statisches Bild anzeigen. Dazu benötigst du eine spezialisierte Komponente, z.B. TGifImage, s.a. GIF-Animation mit TImage anzeigen?!
kandesbunzler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 116
Erhaltene Danke: 1


Delphi 7, XE2
BeitragVerfasst: Do 31.12.20 00:07 
Danke für die Rückmeldung.

Ich habe die verschiedenen Varianten durchprobiert, allerdings ohne Erfolg.

Nach Beschreibung von Y.Elm sollte es integriert sein: "Ab Delphi 2007 wurde TGIFImage in Delphi integriert. Damit kann man ein animiertes GIF einfach in ein TImage laden und dieses wird automatisch abgespielt."

Ich habe die "GIFImage.pas" als Unit in mein Projekt geladen und fehlerfrei (mit-)compliliert. Sobald ich jedoch ein animiertes GIF auf die Form einbinde, kann die "verwendete Unit GIFImage nicht kompiliert werden".
Merkwürdigerweise wird in der Uses-Deklaration automatisch "GIFImage" eingefügt ...

Mit einem statischen GIF gibt es kein Problem.

Woran könnte es liegen?
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Do 31.12.20 10:11 
Welche Delphi-Version benutzt du denn (7 oder XE2)?
kandesbunzler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 116
Erhaltene Danke: 1


Delphi 7, XE2
BeitragVerfasst: Do 31.12.20 12:39 
Ich nutze XE2. Evtl. funktioniert das deshalb nicht, da lt. TGIFImage for Delphi bzw. Delphi programming nur bis Delphi 2010 getestet.

Oder muss das animierte GIF bestimmte Voraussetzungen erfüllen? Das teste ich heute noch einmal.

Moderiert von user profile iconTh69: URL-Titel hinzugefügt.
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Do 31.12.20 13:16 
Du brauchst doch für XE2 keine eigene Unit, sondern kannst die vorhandene Komponente TGifImage nutzen.
kandesbunzler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 116
Erhaltene Danke: 1


Delphi 7, XE2
BeitragVerfasst: So 03.01.21 22:14 
Das hatte ich eigentlich auch erhofft.

Ich versuche folgende Beispielanimation zu (re-)animieren, was leider nur statisch angezeigt wird.
Einloggen, um Attachments anzusehen!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 03.01.21 23:40 
Hast du vielleicht in deinem TGifImage die Property Animate nicht auf True gesetzt?
Wenn du das TGifImage dann in Image.Picture packst, sollte es auch animiert angezeigt werden.
kandesbunzler Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 116
Erhaltene Danke: 1


Delphi 7, XE2
BeitragVerfasst: Mi 06.01.21 11:33 
Manchmal sieht man den Wald vor lauter ... :think:

Danke für den Hint!