Picture distortion

PennController for IBEX Forums Support Picture distortion

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10632
    stradee
    Participant

    Hi, Jeremy.

    In my experiment, I uploaded .png files, and set up their size with pixel.
    But, some pictures(I think in case the original height is longer than the height I set) are distorted.
    How can I modify my script without any picture distortion?
    (maybe using %..?)

    Thank you all time.

    Here is my link>>
    https://farm.pcibex.net/r/ipbjNz/

    #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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.