I've installed ImageResizer (using NuGet) as the backend to this on Umbraco 7.0.3 and attempted to crop an image that's originally 1344px wide by 756 px high.
I zoomed in on the face in the image and applied a crop of 250x250 and the preview retrieved a url like so:
the problem is that ImageResizer specifies the crop as follows:
crop=(x1,y1,x2,y2)
where all values are coordinates (the last two should not be the cropped image width or height). This differs from ImageProcessor and ImageGen which uses the Rectangle paradigm (x, y, width, height) in which case the above url would work.
Because the preview image url above has x1 < x2, ImageCropper is ignoring the crop directive but applying everything else.
Yes you are right, you need to update the formats in the data type settings for ImageResizer as shown here you will then need to move any existing crops to update the save JSON to the new format.
Invalid preview Crops with ImageResizer backend
I've installed ImageResizer (using NuGet) as the backend to this on Umbraco 7.0.3 and attempted to crop an image that's originally 1344px wide by 756 px high.
I zoomed in on the face in the image and applied a crop of 250x250 and the preview retrieved a url like so:
http://localhost:52673/media/1003/nick_trigg_02_web.png?crop=801,45,541,541&width=250&quality=100
the problem is that ImageResizer specifies the crop as follows:
crop=(x1,y1,x2,y2)
where all values are coordinates (the last two should not be the cropped image width or height). This differs from ImageProcessor and ImageGen which uses the Rectangle paradigm (x, y, width, height) in which case the above url would work.
Because the preview image url above has x1 < x2, ImageCropper is ignoring the crop directive but applying everything else.
The correct url should be:
http://localhost:52673/media/1003/nick_trigg_02_web.png?crop=801,45,1342,596&width=250&quality=100
I'm about to go check the actual saved crop to see if it's any different (through the API on an MVC form).
- Rob.
Hi Rob,
Yes you are right, you need to update the formats in the data type settings for ImageResizer as shown here you will then need to move any existing crops to update the save JSON to the new format.
Jeavon
Yup, discovered that after actually reading the documentation :)
... Thought I'd deleted this thread...
Ah great!
is working on a reply...