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.
Insert gif-image(animated) into TRichViewEdit from stream
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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:
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.
Code: Select all
var gif: TGifImage;
gif := TGifImage.Create;
Stream.Position := 0;
gif.LoadFromStream(Stream);
RichViewEdit1.InsertPicture('', gif, rvvaBaseLine);
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.
I am set:
but gif-animation dont play
Code: Select all
RichViewEdit.AnimationMode:=rvaniOnFormat;
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I am download Anders Melander's TGifImage and
update.
Add unit RVGifAnimate into project
(uses)
animation dont play
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);
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: