trichview.com

trichview.support




Saving html image filenames


Return to index


Author

Message

Wietse Hagoort

Posted: 09/23/2004 22:24:55


I want to save the real imagename/path of the image when I export to html.


For example, I inserted a images with the path '/files/images/test.jpg'.

This works (in combination with onImportPicture).


But when I save the document to html,

RichViewEdit1.SaveHTMLToStreamEx( StrStream, '', '', '', '', '', '', [rvsoNoHypertextImageBorders,rvsoUseItemImageFileNames]);


and I want to set the original filename/path in the OnHTMLSaveImage event

I cannot retrieve the original filename.


procedure TfSiteAlgemeen.RichViewEdit1HTMLSaveImage(

  Sender: TCustomRichView; RVData: TCustomRVData; ItemNo: Integer;

  const Path: String; BackgroundColor: TColor; var Location: String;

  var DoDefault: Boolean);

var

  AName : String;

  AGraph : TGraphic;

  AVAlign : TRVVAlign;

  ATag : Integer;

begin

  RVData.GetPictureInfo( ItemNo, AName, AGraph, AVAlign, ATag );

 

  //showmessage( path +' - '+ location + ' - '+ AName );


  Location := '/files/images/'+ AName;

  DoDefault := false;

end;


The problem is that 'GetPictureInfo' retrieves an empty string.


Ofcourse I searched this newsgroup and the helpfile, but I did not find anything

that was working.


Does anyone know how to solve this problem?


Thanks in advance, Wietse





Powered by ABC Amber Outlook Express Converter