So I want to load Pictures from web included in emails I am using THtmViewer and TRVHTMLViewImporter.
It seems it works but after that, there is an error can not load Picture, because it wants to load picture from location "application path + http... again.procedure TF1.RichViewImportPicture(Sender: TCustomRichView;
const Location: TRVUnicodeString; Width, Height: Integer;
var Graphic: TGraphic);
var Stream: TMemoryStream;
if (Pos('http://', LowerCase(Location))=1) or
Stream := TMemoryStream.Create;
// 1. downloading
// 2. creating temporal file
FileName := GetTempFileName(ExtractFileExt(Location));
FileStream := TFileStream.Create(FileName, fmCreate);
// 3. reading and deleting temporal file
pic := TPicture.Create;
Graphic := RV_CreateGraphics(TGraphicClass(pic.Graphic.ClassType));
Graphic := nil;
Do I not correctly assign graphic/picture..?