Rene
1
Hello folks
Is it possible to set the dimensions of an image which is loaded into a Html area the way it resizes to fit in a field.
'<html><table border="0" cellspacing="0" cellpadding="0"><tr><td width="40" height= "40" valign="middle"><img src=\"media:///servoy_blobloader?servername=' + controller.getServerName()+ '&tablename=' + controller.getTableName() + '&dataprovider=picture&rowid1=' + media_infoid + '"></td></tr></table></html>'
Whatever value I set, the image size stays the same.
td width=“40” height= “40”
td width=“20” height= “20”
Thanks in advance Rene.
ROCLASI
2
Hi Rene,
Yes you can set the height and/or width of an image.
You need to set the width and/or height of the
tag.
Rene
3
Thanks Robert,
VERY Obvious.
Is there a way to lock the aspect ratio?
Rene
ROCLASI
4
Hi Rene,
Just by setting either the width or the height (thus only 1 parameter) the other dimension will scale accordingly.
Rene
5
Thanks again Robert.
I tried setting it to 0 but then the original size became active.
Rene
Rene
6
Hello Folks
The image ratio still gets screwed up. This is the code I use
info_value = null
if (media_info_to_location.height)
{
var GI_Heigth = ' height=\"' + media_info_to_location.height + '\"'
}
else
{
var GI_Heigth = null
}
if (media_info_to_location.width)
{
var GI_Width = ' width=\"' + media_info_to_location.width + '\"'
}
else
{
var GI_Width = null
}
info_value = '<html><img' + GI_Width + GI_Heigth + ' src=\"media:///servoy_blobloader?servername=' + controller.getServerName()+ '&tablename=' + controller.getTableName() + '&dataprovider=picture&rowid1=' + media_infoid + '"></html>'
application.output(info_value)
controller.relookup()
This is the output I recieve
However the first two are squares the last two are rectangles portrait and landscape.
It seems that if no value is presented the original dimension will be used.
Thanks in advance Rene