Can I use an image stored in a table in on-the-fly HTML?

Is there a way to reference in an html-based report an image that is stored in a record ? I am generating html code from records in a foundset for a report and would like to include the company’s logo at the top of the report, which is stored in a media column in the Company table. This needs to work in a client-server environment, so referencing the path to the image file won’t work. Adding the image to Servoy’s media library is not an option either, since the solution will be used by different companies and unless I included everyone’s logo in my working copy’s media library, images would be lost after each new version.

Any ideas?
Steve in LA

SteveInLA:
Is there a way to reference in an html-based report an image that is stored in a record ?

ServoyMagazine is always an excellent source of tips…
Check Enrico’s article at this link:
http://www.servoymagazine.com/home/2005 … ing_h.html

Wow! Dream development team indeed. It looks like media:///servoy_blobloader will do exactly what I am trying to do.

Here is something a bit trickier though. Let’s say that I want to limit an image’s height in the HTML code no larger than 100 pixels, but leave the image height alone if it is less than 100 pixels. I can think of how I would write the method, but it relys on knowing the pixel height of the retrieved image. I know that plugins.file.getSize() will get the size of the file’s data, but is there any way to extract an image file’s pixel dimensions?

Steve in LA

Hi Steve,

The Image plugin that comes with Servoy 2.2.3 can retrieve the height and width of an image.