Page 1 of 1
Insert gif-image(animated) into TRichViewEdit from stream
Posted: Thu Jan 31, 2008 11:39 am
by tors
How too Insert gif-image(animated) into TRichViewEdit from stream
(TMemoryStream)
It is necessary that gif-image was stored in the document
( Is direct in a rtf-file)
Need that gif-animation play in TRichViewEdit.
Posted: Thu Jan 31, 2008 12:28 pm
by Sergey Tkachenko
If gif image is stored in TMemoryStream, you can load it in the proper graphic class (see
http://www.trichview.com/forums/viewtopic.php?t=89) and insert:
Code: Select all
var gif: TGifImage;
gif := TGifImage.Create;
Stream.Position := 0;
gif.LoadFromStream(Stream);
RichViewEdit1.InsertPicture('', gif, rvvaBaseLine);
See the topic referenced above how to turn on animations.
But you cannot store gif images in RTF (Rich Text Format) files. This format supports bitmaps, metafiles, png, jpegs, but not gifs.
You can store gif images in RVF files.
Posted: Thu Jan 31, 2008 12:57 pm
by tors
I am set:
Code: Select all
RichViewEdit.AnimationMode:=rvaniOnFormat;
but gif-animation dont play
Posted: Thu Jan 31, 2008 2:06 pm
by Sergey Tkachenko
Did you include the proper file in your project?
RVGifAnimate2007 for Delphi 2007, or
RVGifAnimate for Anders' TGifImage, or
RVJvGifAnimate for JVCL Gif Image?
Posted: Fri Feb 01, 2008 1:46 pm
by tors
I am download Anders Melander's TGifImage and
update.
Add unit RVGifAnimate into project
(uses)
Code: Select all
RichViewEdit.AnimationMode:=rvaniOnFormat;
Code: Select all
GifImg4Paste:=GifImage.TGifImage.Create;
GifImg4Paste.LoadFromFile('c:\aa.gif');//load animated gif
GifImg4Paste.Animate:=true;
//GifImg4Paste.AnimationSpeed:=1000;
Code: Select all
RichViewEdit.InsertPicture('',GifImg4Paste,rvvaBaseLine);
animation dont play
Posted: Sun Feb 03, 2008 4:48 pm
by Sergey Tkachenko
Please send me a simple project to reproduce