In an HTML window, I am setting a custom body
<img src='file://[filename]'>
to display an image.
Now I want to strectch the image to fit the available window, but preserve aspect ratio.
<img src='file://[filename]' width='100%' height='100'>
stretches but also distorts the image.
Is there some HTML trickery to do that? IE only solution is fine, since this is in a hosted broweser control.
If you want to preserve aspect ratio, you only need to specify one dimension ie:
You can use javascript to determine max dimension and resize accordingly