trichview.support
Re: How to insert gif into the richview |
Author |
Message |
Sergey Tkachenko |
Posted: 02/09/2003 16:02:52 Hi, If you want to preserve gif format when exporting to HTML, you need to process OnHTMLSaveImage. The code can be: procedure TForm3.RichViewEdit1HTMLSaveImage(Sender: TCustomRichView; RVData: TCustomRVData; ItemNo: Integer; const Path: String; BackgroundColor: TColor; var Location: String; var DoDefault: Boolean); var gr: TGraphic; Tag: Integer; VAlign: TRVVAlign; Name: String; begin if (ItemNo>=0) and ( (RVData.GetItemStyle(ItemNo)=rvsPicture) or (RVData.GetItemStyle(ItemNo)=rvsHotPicture)) then begin RVData.GetPictureInfo(ItemNo,Name,gr,Valign,Tag); if (gr is TGifImage) then begin Location := RVData.GetNextFileName('img' {*}, Path, '.gif', Sender.imgSaveNo, True {*}); gr.SaveToFile(Location); Location := ExtractRelativePath(Path, Location); DoDefault := False; end; end; end; Note {*} - pass here parameters passed to SaveHTML (or SaveHTMLEx). If you use RichViewActions, you can use rvActionExport.ImagePrefix and rvsoOverrideImages in rvActionExport.SaveOptions here. > > Hi, > How do I insert a gif into the richview. I have RX component installed and > believed that this will automatically enabled gif ability for this component,richview(am > i right?). There is a gif support in the RX component. > > Now, will my gif file be converted to jpeg on saving? On converting to HTML > how do I preserve the original graphics as gif? > > Thanks |
Powered by ABC Amber Outlook Express Converter