This works fine provided I don't make any attempt to use the control to actually crop or set the focus point. When I do this and then publish all I get it an image of the right width, but only 1px in height.
Has anyone come across this issue before or has any suggestions? I'm using Umbraco 7.1.6, which came bundled with ImageProcessor 1.9.5.
Yes I've got a data type for this which has two crops available, one for use as a "hero" image where applicable and another for the basic header image.
I've done this locally first of all. After stopping the app pool, deleting the cache folder and then re-trying the crop and publish, I'm now getting an exception if I try and view the image.
The query string for this looked like this: ?crop=0.028098407791517083,0.27991935081771041,0.22399572862651251,0.50681061777024328&cropmode=percentage&width=1920&height=365&rnd=130552761170000000
Thanks a lot for your help guys - ImageResizer was the problem. We'd used that before in Umbraco projects and have recently made the jump to Umbraco 7. ImageProcessor looks like a great library.
Image Cropper results in 1px height
Hi there,
I'm experiencing a strange issue in Umbraco 7.1 using the Image Cropper data type.
I've set my cropper up and use it the way it is shown in the following guide.
http://our.umbraco.org/documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Image-Cropper
This works fine provided I don't make any attempt to use the control to actually crop or set the focus point. When I do this and then publish all I get it an image of the right width, but only 1px in height.
Has anyone come across this issue before or has any suggestions? I'm using Umbraco 7.1.6, which came bundled with ImageProcessor 1.9.5.
Thanks,
Craig
Hi Craig,
could you please post your code and also the resulting URL (including the querystring) of the output image?
Thanks,
Jeavon
Hi Jeavon,
My code looks like this
Which I then use in the markup like so:
Which ends up procuding the following image URL:
That looks ok, if you enter http://YOURDOMAIN/media/1156/optimized-img_9202-1.jpg?crop=0,0.29666666666666669,0,0.41817708333333331&cropmode=percentage&width=1920&height=365 in your browser does it produce anything?
If I browse to the image itself it gives my an image with dimensions 1920x1. It just looks like a 1px black line.
Is that without the querystring?
Sorry, that is with the querystring. If I take the querystring off I get the original image, which in this case is 1920x1280.
Hmm, could you add
&upscale=true
e.g. http://YOURDOMAIN/media/1156/optimized-img_9202-1.jpg?crop=0,0.29666666666666669,0,0.41817708333333331&cropmode=percentage&width=1920&height=365&upscale=trueHi Jeavon,
No luck with that either. You can see how it looks here... (values have changed as I've been trying to get it to work)
http://thorntoun-cms.proof.microtechsupport.com/media/1156/optimized-img_9202-1.jpg?crop=0,0.299375,0,0.41546875&cropmode=percentage&width=1920&height=365&rnd=130552725180000000&upscale=true
Hmm, and you have a predefined crop (alias "Header Image") of 1920x365?
Yes I've got a data type for this which has two crops available, one for use as a "hero" image where applicable and another for the basic header image.
Very strange, I have recreated your setup with your image and it works perfectly!
Could you try stopping your application pool and deleting the /App_Data/Cache folder and then restart the application pool?
I'll also see if James (creator of Image Processor) has any idea on this
I've done this locally first of all. After stopping the app pool, deleting the cache folder and then re-trying the crop and publish, I'm now getting an exception if I try and view the image.
The query string for this looked like this: ?crop=0.028098407791517083,0.27991935081771041,0.22399572862651251,0.50681061777024328&cropmode=percentage&width=1920&height=365&rnd=130552761170000000
Have you?.... Have you got ImageResizer installed? sheds a single tear
It's that that is breaking. ImageProcessor is a different bag baby!
Ah ha, GetCropUrl is not compatible with ImageResizer only ImageProcessor
I do, indeed! Now I've had this look under the hood and know about ImageProcessor this makes sense.
I'll remove ImageResizer this morning and test and let you guys know how it goes.
Thanks a lot for your help guys - ImageResizer was the problem. We'd used that before in Umbraco projects and have recently made the jump to Umbraco 7. ImageProcessor looks like a great library.
Good man, and thanks! :)
There's fairly comprehensive docs on imageprocessor itself here.
is working on a reply...