trichview.com

trichview.support




Re: are animated gif's allowed in richview?


Return to index


Author

Message

Sergey Tkachenko

Posted: 06/10/2003 22:27:21


Hi


1) Animated images are not supported directly

(but if you want to use gif as graphics, you need to call

  RegisterClasses([TGifImage]);

  RV_RegisterHTMLGraphicFormat(TGifImage);

  TPicture.RegisterFileFormat('gif', 'Gif Image', TGifImage);)


2) You can insert component playing animation:


First, you need to use some class for playing gif animation.

For example,

    http://www.torry.net/vcl/graphics/gif/gifimage.exe (original)

    http://clootie.narod.ru/delphi/download_vcl.html (update)

Update is necessary!


The code for inserting animation:


var image: TImage;

    gif : TGifImage;

begin

  image := TImage.Create(nil);

  image.AutoSize := True;

  gif := TGifImage.Create;

  gif.LoadFromFile('d:\1.gif');

  image.Picture.Graphic := gif;

  gif.Free;

  RichViewEdit1.InsertControl( '', image, rvvaBaseLine);

end;


Besides, you need to call

RegisterClasses([TGifImage,TImage]);

somewhere at the beginning of the program (for example, in the

initialization section of the main form's unit).






> Hi!

>

> I saw some animated graphisc in trichview demo, but when i tried to insert

> animated gif into other demo (of TRichViewEdit control) i received runtime

> error: Unknown picture file extention (gif)

>

> maybe it's matter of some wrappers to self-prepare

> (if yes, are there any demos or tutorials?)

>

>

> best!

> panorek

>

>





Powered by ABC Amber Outlook Express Converter