Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use animated gif in Firemonkey?

How can I use animated GIF in Firemonky. I can load the gif using Timage but it's not animating. I am using Delphi 10.2 tokyo.

like image 985
Abhishek Avatar asked Dec 18 '22 05:12

Abhishek


1 Answers

Maybe a bit late, but found a simple solution on this page : http://www.raysoftware.cn/?p=559 Download the file http://www.raysoftware.cn/wp-content/uploads/2016/12/FMXGif.rar, uncompress, and take the file FMX.GifUtils out, and put in your the directory of your application

Put a image component on your form with name Image1

Put the file FMX.GifUtils in your use on top

Declare in your form in private :

FGifPlayer: TGifPlayer;

in the create of your form:

 FGifPlayer := TGifPlayer.Create(Self);
 FGifPlayer.Image := Image1;
 FGifPlayer.LoadFromFile('youfilename.gif');
 FGifPlayer.Play;

That's it;

like image 173
Ydakilux Avatar answered Dec 24 '22 01:12

Ydakilux