ImageEn, unit imageenio

TImageEnIO.LoadFromURL

TImageEnIO.LoadFromURL


Declaration

function LoadFromURL(const URL: WideString): Boolean;


Description

Loads the image from the internet using the HTTP or FTP protocol.

Password authentication for HTTP is NOT supported, while it is necessary for FTP (even if connecting to an anonymous server).

URL must be in the format:
'http://domain[:port]/resource'
'https://domain[:port]/resource'
'ftp://user:password@domain[:port]/resource'

It is possible to set proxy parameters using ProxyAddress, ProxyUser and ProxyPassword properties.


Example

// load from standard port 80
ImageEnView1.IO.LoadFromURL('http://www.imageen.com/graphics/imageen.gif');

// load from port 8080
ImageEnView1.IO.LoadFromURL('http://www.imageen.com:8080/graphics/imageen.gif');

// load from FTP
ImageEnView1.IO.LoadFromURL('ftp://space:shuttle@ftp.example.com/Pictures/test.jpg')