trichview.support
Re: RVDONOTUSEJPEGIMAGE |
Author |
Message |
Sergey Tkachenko |
Posted: 07/25/2004 14:11:43 Defining RVDONOTUSEJPEGIMAGE will remove all the special support for TJpegImage class. It's not only HTML export. You can use OnSaveImage2 to export all graphics in HTML as BMP: procedure TForm3.RichViewEdit1SaveImage2(Sender: TCustomRichView; Graphic: TGraphic; SaveFormat: TRVSaveFormat; const Path, ImagePrefix: String; var ImageSaveNo: Integer; var Location: String; var DoDefault: Boolean); var bmp: TBitmap; begin if SaveFormat<>rvsfHTML then exit; bmp := TBitmap.Create; try bmp.Assign(Graphic); except bmp.Width := Graphic.Width; bmp.Height := Graphic.Height; bmp.Canvas.Draw(0, 0, Graphic); end; Location := Sender.RVData.GetNextFileName(ImagePrefix, Path, '.bmp', ImageSaveNo, False); bmp.SaveToFile(Location); Location := ExtractRelativePath(Path, Location); DoDefault := False; end; Note: there was a bug in one of TRichView versions: ImageSaveNo was not defined as VAR-parameter. If you use that version, use Sender.imgSaveNo in call of GetNextFileName instead. > > I need RichView to export all picture as BMP files when I use SaveHTMLEx. > I saw that I can use RVDONOTUSEJPEGIMAGE or create a entry for every graphic > that I am going to use. I do not understand how to use RVDONOTUSEJPEGIMAGE > and would prefer to use this as I don't have to create entry's for all the > different kinds of picture files. Can you maybe help me on this and maybe > some advice if you think I am going about this wrong. > > Thank You > W. Redelinghuys |
Powered by ABC Amber Outlook Express Converter