You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, so there's a problem which happens under some particular circumstances:
I have an unusual image size of 880x240 hard-crop (which i call Extra-Wide), which works fine for some images, but then others were not. I discovered that the images it was not working on were the ones that were under certain dimensions, the specific case: a 1127x750 photo. A extra-wide cropped image is being generated with the right dimensions (880x240) but the actual photo is weirdly stretched vertically.
After carefully looking, I noticed that the cropping tool was showing a slightly narrower (vertically) cropping box than on other images where it was working as expected. A closer inspection to the javascript generated had in its settings "aspectRatio: 4.6958333333333" when it should have been "aspectRatio: 3.6666666666667" as it did on other images.
This takes me to /lib/ManualImageCropEditorWindow.php, lines 114 to 122. Here the aspect ratio for the cropping box is being overwritten when its over a value from calculations made based on the minimum with and height of the previewer. The problem: it disregards the real aspect ratio for the cropping tool, and then the actual cropping process will have mismatched ratios (from the cropping tool and the actual one) resulting in a stretched image.
i have commented the above mentioned lines and this resolved the problem, however i do not know their original purpose, so worth having a look to fix it properly for the next release.
Thanks
The text was updated successfully, but these errors were encountered:
Hi, so there's a problem which happens under some particular circumstances:
I have an unusual image size of 880x240 hard-crop (which i call Extra-Wide), which works fine for some images, but then others were not. I discovered that the images it was not working on were the ones that were under certain dimensions, the specific case: a 1127x750 photo. A extra-wide cropped image is being generated with the right dimensions (880x240) but the actual photo is weirdly stretched vertically.
After carefully looking, I noticed that the cropping tool was showing a slightly narrower (vertically) cropping box than on other images where it was working as expected. A closer inspection to the javascript generated had in its settings "aspectRatio: 4.6958333333333" when it should have been "aspectRatio: 3.6666666666667" as it did on other images.
This takes me to /lib/ManualImageCropEditorWindow.php, lines 114 to 122. Here the aspect ratio for the cropping box is being overwritten when its over a value from calculations made based on the minimum with and height of the previewer. The problem: it disregards the real aspect ratio for the cropping tool, and then the actual cropping process will have mismatched ratios (from the cropping tool and the actual one) resulting in a stretched image.
i have commented the above mentioned lines and this resolved the problem, however i do not know their original purpose, so worth having a look to fix it properly for the next release.
Thanks
The text was updated successfully, but these errors were encountered: