Jump to content
kaarigar

Create animated GIF in FireMonley

Recommended Posts

Is it possible to create animated GIF using FireMonkey? I have a set of images using which I want to create an animated GIF. Can someone point me to any component or a library that generates animated GIF in FireMonkey? Yhanks!

Share this post


Link to post

I doubt it. GIF is too old and also infected with proprietary license.

Do you really want to create GIF file or just some animation?

  • Like 1

Share this post


Link to post
2 hours ago, Fr0sT.Brutal said:

I doubt it. GIF is too old and also infected with proprietary license.

Do you really want to create GIF file or just some animation?

I don't know about the proprietary license for GIF - the web is full of GIFs and now there are open source libraries to create and manage them.

I want to save the animation to a file - so I thought animated GIF may be a simplest way of doing so. The movie format MP4 would also do, but I thought that would be computationally more intensive.

Basically any format that can play animation is acceptable for my application. Thank you.

Share this post


Link to post

I wasn't aware GIF has cured of its license. However it's still outdated. Seems now APNG, MP4 and WEBM rule but whether use them or not depends on whether you can manage to find corresponding Delphi libs.

Share this post


Link to post

oh sorry, you want to create GIF...I use GifCam for that, but if you need to this by code it's a bit complexe because GIF supports only 256 colors per frame

Share this post


Link to post
On 10/17/2022 at 5:47 PM, kaarigar said:

Thanks for pointing this out. It's a GIF reader that supports reading and displaying animated GIF. Perhaps I can see if I can write a GIF writer based on this.

My 2 cents : 

For Displaying and animating :

https://github.com/TomDannert/GIFImage 

- Skia4Delphi ! 

 

I do not advise you to use http://www.raysoftware.cn/559.html : It unfortunaly not work on all gif, and on recent compiler, it does not pass range checking.

Tom Dannert's version (https://github.com/TomDannert/GIFImage ) is a far better start if you want to write a Gif Writer. 

 

It is right that, under FMX, full cross platform (linux and mobile included), I do not have direct solution to write GIF.

 

  • Like 1

Share this post


Link to post
47 minutes ago, Vincent Gsell said:

My 2 cents : 

For Displaying and animating :

https://github.com/TomDannert/GIFImage 

- Skia4Delphi ! 

 

I do not advise you to use http://www.raysoftware.cn/559.html : It unfortunaly not work on all gif, and on recent compiler, it does not pass range checking.

Tom Dannert's version (https://github.com/TomDannert/GIFImage ) is a far better start if you want to write a Gif Writer. 

 

It is right that, under FMX, full cross platform (linux and mobile included), I do not have direct solution to write GIF.

 

Hi Vincent, thanks for your response. I will check out the Tom Dannert's version. There are also some other versions in circulation that are based on RaySoftware's and claim to be bug free. However, my interest in is *creating* animated GIF in Firemonkey for all platforms supported.

Share this post


Link to post

I use the FFVCL component. It allows encoding using FFmpeg to many formats including animated Gif and animated PNG. FMX is supported and platforms Windows, Mac and Android. It's not free though and does require that you include the ffmpeg libraries with your app, which are quite large. The old gifimage code by Anders Melander works on VCL, but not FMX unfortunately. If you're running on Windows only then that may be an option though.

 

http://www.delphiffmpeg.com/

 

https://docwiki.embarcadero.com/Libraries/Sydney/en/Vcl.Imaging.GIFImg.TGIFImage

Edited by XylemFlow
  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×