![]() |
|
Show highres image scaled in ModalWindow - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Show highres image scaled in ModalWindow (/thread-1889.html) |
Show highres image scaled in ModalWindow - PaulWeem - 08-19-2020 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 RE: Show highres image scaled in ModalWindow - PaulWeem - 08-27-2020 Nobody? RE: Show highres image scaled in ModalWindow - kudzu - 08-27-2020 How are you specifying the image in the modal window? RE: Show highres image scaled in ModalWindow - PaulWeem - 08-27-2020 I pass the url to the image to the ModalWindow. For example: https://images.pearleurope.com/img/sts904xpc103/sts904xpc103.jpg RE: Show highres image scaled in ModalWindow - kudzu - 08-27-2020 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 RE: Show highres image scaled in ModalWindow - PaulWeem - 08-28-2020 Directly as a URL. I will have a look at your link regarding HTML tag. Thanks! RE: Show highres image scaled in ModalWindow - PaulWeem - 08-28-2020 (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. 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. RE: Show highres image scaled in ModalWindow - kudzu - 08-28-2020 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_to_resize_images_in_html.cfm This trick may also help: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Backgrounds_and_Borders/Resizing_background_images |