We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42766
    • 47 Posts
    I hit a problem with TVImage+ and found a solution - sharing here in the hope it's useful to someone.

    A number of images uploaded into a site by a client of mine were loading in the cropping editor 'warped'. The images were being stretched out of ratio. The results of the crop were perfect as if I'd drawn a box on a correct image, but it was pretty hit and miss when I wasn't drawing over a real representation of the source file.

    Attached are three screen shots: one of IE which was loading them as they should be and then the way Chrome and Firefox were both loading then incorrectly (or maybe more correctly, but not the way I needed them!)

    It seemed to affect some images reliably while others were OK.

    When I copied and pasted the /phpthumb/ image-generating-URL I lifted from the manager page source code into the address bars of each of the major browsers, IE vs Safari/Chrome/FireFox were actually receiving different images from the script (IE was getting one, the other 3 the same wrong image). I don't even get how this is possible - if anyone can shed any light on that I'd love to hear from you below!

    When I started playing with the settings in the URL, I found that adding in iar=1 (ignore aspect ratio) fixed it.

    Anyone looking to solve this in their own install, the file to edit is /assets/components/tvimageplus/mgr/js/tvimageplus.window.editor.js

    At line 91 & 101 insert the following line below the line containing 'getDisplayHeight()':
    ,iar: 1

    A browser refresh/cache dump (whatever it takes to get that updated JavaScript file into the browser) should see the images loading as expected! [ed. note: jcdm last edited this post 10 years ago.]