Show image in HTMLViewer from DB

i want to show an image in HTMLViewer. this code works perfectly

<img src="">

how i could do the same but extracting the image from a DB?

must be taken into account that the HTMLViewer control only accepts as a parameter the entry of a string. for example:

[code] Dim f As FolderItem = GetTemporaryFolderItem
dim htmlstring as string

htmlstring="<img src="“”">"

HTMLViewer1.LoadPage(htmlstring, f)[/code]

Save the picture as file in the temporary folder with something like

[code]Dim f As FolderItem = GetTemporaryFolderItem = + “.png”

//Create picture from data coming from the db
'decodehex, picturefromdata
// save
pic.Save(f, Picture.SaveAsJPEG)

Then load it in the HTMLViewer with LoadURL


When building apps with an HTML interface I often in-line images in the HTML. This circumvents the need to run a local web server. You can embed images in HTML. The crux of it is get the image data and then base64 encode it. You end up with an image tag that looks like:


I got that example from:

great ideas! i think the solution i need is the one proposed by @Phillip Zedalis … thanks a lot both of you