1

How I can play gif picture animation using Firemonkey that will be used in Android and iOS app ?

I am using Delphi XE 8.

Note: I saw this question Animated GIF in Firemonkey but I dont have the animation as sprites only as a single gif file.

Community
  • 1
  • 1
zac
  • 4,495
  • 15
  • 62
  • 127
  • Did you check this: http://stackoverflow.com/questions/14158186/animated-gif-in-delphi-xe-3-forms and http://galfar.vevb.net/imaging/smf/index.php?topic=814.0 – Hans Jul 07 '15 at 07:54
  • yes I used to do this in vcl applications but it does not work with firemonkey – zac Jul 07 '15 at 07:55
  • @Hans -- how could i get more information about your company? – Zam Jul 07 '15 at 08:14
  • http://stackoverflow.com/questions/11870944/animated-gif-in-firemonkey – Zam Jul 07 '15 at 09:33

2 Answers2

2

You can use third-party library. One of the best options is the control TSkAnimatedImage of the library Skia4Delphi: https://github.com/skia4delphi/skia4delphi

vfbb
  • 611
  • 7
  • 15
0

Due to how Firemonkey works with images and bitmaps, TGIFImage doesn't exist anymore.

So the easiest way of doing this is by using a TWebBrowser component and then loading your .gif file into that component

For Firemonkey Apps you can set the deployment of files for each different platform, but in the case of a Windows Firemonkey App you can add your .gif files to your project and then set the URL to the local file (or you can set it to a remote URL if you want to use a gif that you don't have)

And to get your gif in the browser for Win simply set the gif as the URL

WebBrowser1.URL := 'file://'+ ExtractFilePath(ParamStr(0))+'images\somegif.gif';
WebBrowser1.Navigate;
Peter-John Jansen
  • 603
  • 1
  • 7
  • 26