Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Show highres image scaled in ModalWindow
#1
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
Reply
#2
Nobody?
Reply
#3
How are you specifying the image in the modal window?
Reply
#4
I pass the url to the image to the ModalWindow. For example:

https://images.pearleurope.com/img/sts90...xpc103.jpg
Reply
#5
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
Reply
#6
Directly as a URL. I will have a look at your link regarding HTML tag.

Thanks!
Reply
#7
(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.
Reply
#8
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)