how do i animate TJvGIFImage?
Asked Answered
G

2

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 ?

Gastrula answered 15/4, 2016 at 0:41 Comment(1)
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.Linoleum
B
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;
Brelje answered 15/4, 2016 at 4:54 Comment(0)
A
-3

Try the TJvGIFAnimator component?

Awning answered 15/4, 2016 at 1:32 Comment(5)
TJvGIFAnimator is not Tgraphic !Gastrula
Please don't answer a question with another question.Bicker
@martin maybe not, but why not dig a bit to see what it is?Murrell
@RobKennedy Point taken.Awning
@DavidHeffernan Amen.Awning

© 2022 - 2024 — McMap. All rights reserved.