Recently my wife asked me to help with an urgent request: a simple animation for a family dinner presentation. It was to be the last slide of the night, to cheer everyone up.
She had two animated gifs, the first from Quentin Tarantino’s famous Pulp Fiction dance scene, and another of an unknown origin. The plan was to overlay the heads with pictures of her parents and their grand children, then add an upbeat soundtrack.
The first issue was, how to play an animated Gif in FMX. A StackOverflow answer led me to TGifPlayer. Playing the animated gif couldn’t be simpler, you associate the player with an image, load the gif from file, and instruct the player to play.
I used two frames, one for each animated gif. On each frame the head of each person was overlayed ontop of an animated gif head:
Each frame had a timer to co-ordinate the rotation of the head, the code couldn’t be simpler, for example rotating the grand parents:
I then recorded the animation with Obs and used Windows Movie Maker to add fading effects, and a sound track. Thanks to the excellent TGifPlayer, and FMX, this was a very simple and timely task.