trichview.com

trichview.support




Re: How to display a picture in a richview-freeware


Return to index


Author

Message

Sergey Tkachenko

Posted: 09/13/2004 9:41:13


Hi,


You need to download it and insert.

For downloading, you can use Indy (included in the new versions of Delphi),

or can be installed separately.


var Stream: TMemoryStream;

      jpg: TJpegImage;


// Internet ---> TJpegImage

Stream := TMemoryStream.Create;

idhttp1.Get('http://www.my-website.com/my-picture.jpg', Stream);

Stream.Position := 0;

jpg := TJpegImage.Create;

jpg.LoadFromStream(Stream);

Stream.Free;

// building document

rv.Clear;

rv.AddPicture(jpg);

rv.Format;


The same code will work in new version of TRichView (AddPicture method is a

deprecated method now, but still works)



>

> Please,

> I have an url with a picture like http://www.my-website.com/my-picture.jpg

> and I would like to display the picture in the richview. Can you help me?





Powered by ABC Amber Outlook Express Converter