i have been using TGIFImage
for while but i stuck with Some bugs with it so i decided to move To TJvGIFImage
and here how i load image
AGIF := TJvGIFImage.Create;
AGIF.LoadFromFile('what ever image');
AGIF.Transparent := true;
but there is no animate property inside TJvGIFImage
like in Tgifimage
as eg .
AGIF := TGIFImage .Create;
AGIF.LoadFromFile('what ever image');
AGIF.animate := true;
AGIF.Transparent := true;
how do i set the animation for TJvGIFImage
?
If you are trying to show an animated gif with TJvGIFImage, you should use TJvGIFAnimator instead of TImage. TJvGIFAnimator as an animate property as well as some other properties for animation.
procedure TForm2.LoadGif(const AFilename: string);
var
aGif: TJvGIFImage;
begin
aGif := TJvGIFImage.Create;
try
aGif.LoadFromFile(AFilename);
JvGIFAnimator1.Image.Assign(aGif);
JvGIFAnimator1.Animate := true;
finally
aGif.Free;
end;
end;