I download a animated GIF file from . The following the instructions in How to use Animated Gif in a delphi form to play it. But what I see is always a white block without any animation. Why?
Let me describe the process in details:
When I try to add the animated GIF, I see the following screen:
After clicking "OK" button, I will see below:
The whole project(Delphi 10.3) is at https://www.dropbox.com/s/jbsj86fgpq6qkpi/TestGIF.zip?dl=0
The related codeline is only below:
procedure TForm1.Button1Click(Sender: TObject);
begin
(Image1.Picture.Graphic as TGIFImage).Animate := True;
( Image1.Picture.Graphic as TGIFImage ).AnimationSpeed:= 500;
end;
More information:
- I see Vcl.Imaging.GIFImg is added automatically after I set the picture to the GIF image.
- I cannot see the first frame in the designer, what I can see is a white block.
- I have tried other GIF images.For static images, they can be displayed properly. For animated GIF, when I load it, the Picture Editor will be able to show the first frame, but when I select "OK", the TImage will become a white block again.