Umbraco ImageCropper bug and always saves the center of the image
//
UPDATE 5 MINUTES LATER :
We experience the same problem with an Umbraco 6.1.6 installation
//
We have an Umbraco 4.11.10 installation and are using the ImageCropper to ensure the images on the website are cropped by the correct size and aspect-ratio.
Now we have noticed the ImageCropper of Umbraco has a problem/bug with crops on larger images.
We have experienced that :
An image has the dimensions (W * H) : 3617px x 1200px.
One of our croppings has the following settings : width:960px, heigth: 960px, keep aspect : yes, CM.
With the image cropper loading we see that cropping defaulty loads with the cropping dimension of : 1201 x 1201 Which means the crop will be 1 pixel larger then the original size. (weird, sounds like a rounding problem in JCrop).
Now our problem: Dispite sliding the crop from left to right, after saving the cropping is always in the dead-center of the image.
Diving inside the code of Umbraco I see the following code within the "GenerateThumbnails" function of the "ImageInfo" class of umbraco.editorControls.imagecropper :
With this 1 pixel difference, the if-statement wich checks if the cropping is larger than the original image-size is always True.
Which means the Preset.Fit(this); function is called and the center of the image is always taken.
Our question: How do we fix this? Can we update to a later version where this but is resolved? Or how do I change the rounding of JCrop to ensure the 1200 height is 1200 px and not 1201 px.
Umbraco ImageCropper bug and always saves the center of the image
// UPDATE 5 MINUTES LATER : We experience the same problem with an Umbraco 6.1.6 installation //
We have an Umbraco 4.11.10 installation and are using the ImageCropper to ensure the images on the website are cropped by the correct size and aspect-ratio.
Now we have noticed the ImageCropper of Umbraco has a problem/bug with crops on larger images.
We have experienced that : An image has the dimensions (W * H) : 3617px x 1200px.
One of our croppings has the following settings : width:960px, heigth: 960px, keep aspect : yes, CM.
With the image cropper loading we see that cropping defaulty loads with the cropping dimension of : 1201 x 1201 Which means the crop will be 1 pixel larger then the original size. (weird, sounds like a rounding problem in JCrop).
Now our problem: Dispite sliding the crop from left to right, after saving the cropping is always in the dead-center of the image. Diving inside the code of Umbraco I see the following code within the "
GenerateThumbnails
" function of the "ImageInfo
" class ofumbraco.editorControls.imagecropper
:With this 1 pixel difference, the if-statement wich checks if the cropping is larger than the original image-size is always True. Which means the
Preset.Fit(this);
function is called and the center of the image is always taken.Our question: How do we fix this? Can we update to a later version where this but is resolved? Or how do I change the rounding of JCrop to ensure the 1200 height is 1200 px and not 1201 px.
Please help!
Anyone??!
is working on a reply...