Atozed Forums

Full Version: Show highres image scaled in ModalWindow
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I'm using IW 15.2.12 and Delphi 10.3.3, but I doubt if this has anything to do with my challenge.

As you all may know, when you open an URL to a high resolution image, this image opens in the browser and the image is scaled to the browser so that it's completely showing.
I would like to achieve the same result, but then in a ModalWindow. But when opening the same highres image URL in a ModalWindow, the image is shown in real size.

Is there a way to show this highres image scaled in a ModalWindow?

Thanks in advance for your tips/solutions!

Cheers, Paul
Nobody?
How are you specifying the image in the modal window?
I pass the url to the image to the ModalWindow. For example:

https://images.pearleurope.com/img/sts90...xpc103.jpg
Are you passing it directly as a URL or as a tag in HTML? With the HTML tag you can control the size and how it is displayed with attributes.

https://www.w3schools.com/tags/tag_img.asp
Directly as a URL. I will have a look at your link regarding HTML tag.

Thanks!
(08-27-2020, 08:59 PM)kudzu Wrote: [ -> ]Are you passing it directly as a URL or as a tag in HTML? With the HTML tag you can control the size and how it is displayed with attributes.

https://www.w3schools.com/tags/tag_img.asp

Have been reading this topic, but that would mean that for every image I have to calculate the width and height, because not all images are of the same dimensions and/or ratio.
If you send only the image URL, it will be up to the browser to decide. Normally it will show it at full resolution.

Max-width/height can be set at as %

https://www.quackit.com/html/howto/how_t...n_html.cfm

This trick may also help:
https://developer.mozilla.org/en-US/docs...und_images