Page 1 of 1

animated gif issue

Posted: Mon Dec 22, 2008 11:23 am
by cychia
function getgraphicclass: TGraphicClass;
-> this function i used to return proper graphic class TGifImage is class uses for gif image

procedure InsertPicture(mstrmPhoto);
begin
gr := RV_CreateGraphics(TGraphicClass(getgraphicclass));
gr.LoadFromStream(mstrmPhoto);
InsertPicture(strTageContent, gr, PictureAlign);
end;

initialization
RegisterClasses([TGifImage]);
TPicture.RegisterFileFormat('gif', 'Gif Image', TGifImage);

RVGifAnimate2007 is already added to my project

but the gif is still not animate. anything i miss?

Posted: Mon Dec 22, 2008 4:30 pm
by Sergey Tkachenko
Assign RichViewEdit1.AnimationMode := rvaniOnFormat.

Posted: Tue Dec 23, 2008 1:11 am
by cychia
oops sorry actually i did assign
RichViewEdit1.AnimationMode := rvaniOnFormat.

but forget to list down in my post.

the gif still not animating, any clue?

Posted: Tue Dec 23, 2008 3:43 am
by cychia
additional info, rv editor is built into a dll.

Posted: Tue Dec 23, 2008 5:02 pm
by Sergey Tkachenko
Sorry, I do not know why it does not work.
Including RVGifAnimate2007 in the project (providing that you use Delphi 2007 or 2009) and assigning AnimationMode must be enough.
Animation uses a simple timer, so I think there must be no problems with DLL.
Total Commander plugin for displaying RVF files displays gif animation (though it was compiled with older version of Delphi and RVGifAnimate unit), and it is implemented as a dll.

Can you create a simple example demonstrating the problem?