If you’re using Web edition you could also just send the gif to the browser, no need to download it to your server.
You might have to roll your own custom control with the WebSDK to supply your own <img> tag because the docs say that WebImageView only supports PNG and JPEG.
But really, hotlinking via the image tag would be better for everyone except the image host in the long run. It saves your server from having to download, convert, and serve the image.
The user wins with faster loading.
You win with faster loading, and less server stress.
The original image host loses out however, because hotlinking is essentially stealing their bandwidth.
It’s working now pretty well for me. If you’re interested in my solution:
I declared a constant constMyPic, holdig the HTML-Code for embedding the picture. The parameter %s will be replaced by the name of the picture in the Sub GetPicture:
[code]Private Const constMyPic as String =
AMC-Forum
[/code]
Public Sub GetPicture(foo as String)
dim pic as string
// pic erhlt den HTML-Code zur Darstellung des Bildes
if foo <>"" then
// Es ist der Dateiname fr ein Foto gespeichert
if PictureExists(glbPathToFotos + foo) then
// Das Foto existiert auf dem Server
pic = Replace(constMyPic, "%s", foo)
else
// Bild existiert nicht
pic = Replace(constMyPic, "%s", "nopic80x100.png")
end if
else
// Text ist leer
pic = Replace(constMyPic, "%s", "nopic80x100.png")
end if
// Jetzt den in pic gespeicherten HTML-Text laden
htmlPerson.LoadPage(pic)
End Sub
In Sub GetPicture() the existence of the picture ist checked in the global function PictureExists():
[code]Public Function PictureExists(cPath as String) as Boolean
// Prft, ob das Bild existiert
// cPath: z. B. glbHostPathToUserPic+“nopic80x100.gif”, also z. B. “upload/bilder/user/nopic80x100.gif”
Dim logoPath as String
Dim logoLocation as FolderItem
Dim result as Boolean = false