0

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 ?

Bill Woodger
  • 12,968
  • 4
  • 38
  • 47
MartinLoanel
  • 184
  • 3
  • 17
  • Please try to check what the tags mean before randomly applying them. JCL means nothing like you think it does, so I'm removing it. – Bill Woodger Apr 15 '16 at 08:19

2 Answers2

3

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;
J.Pelttari
  • 516
  • 3
  • 6
-3

Try the TJvGIFAnimator component?

Kevin McBrearty
  • 265
  • 3
  • 9