PennController for IBEX › Forums › Support › Picture distortion › Reply To: Picture distortion
May 30, 2023 at 8:26 am
#10637
Jeremy
Keymaster
Hi,
The images will be shown at the size you specify in the .size
comment. If your original is, say, 1500*850px (a ratio of ~1.8)and you force a size of 450*450px (ratio of 1) then you should expect the image to be displayed distorted. What you can do is .css({"max-width": "450px", "max-height": "450px"})
— if your original image doesn’t have a ratio of 1, its displayed size won’t be 450*450px, but it will be resized so that its longer dimension will be 450px
Jeremy