Resize picture to fit viewing pane if image is huge?
One suggestion: if the uploaded image is of a rather large size (say 1000pixels by 1000pixels for example) it would be nice for the image to be scaled to a sensible/manageable size so that you don't get scrollbars... therefore allowing the crop to be executed more easily. You could set the <img width and height to be 100% and limit the size within a containing div....but maybe still calculate the containing div's aspect ratio from the original image?
I am pretty sure that ImageGen Pro allows you to scale down if the image is larger than a certain dimension. Check it out.... http://our.umbraco.org/projects/imagegen
I was talking more specifically for the umbraco back end. Are you suggesting that I imageGen could be used together with the imagecropper datatype and the crop would still be taken from the original? It's really hard to demostrate this problem.... I know imageGen is a breeze for image re-sizes on the front end (website) so hadn't thought about using it on the back end as well.... will give it a try... and see what happens.
Tim I know the problem you are talking about. Having such a large original image simply doesnt fit into the right panel of umbraco and causes scroll bars to appear.
I think it is a good suggestion and agree that it is a pain to work with the scrollbars when trying to make the crop.
Did anyone manage to get a working solution to the large images displayed in the image cropper? Were you able to use ImageGen to resize to a manageable size for cropping?
(I'll update the "official" stand alone Image Cropper package with this dll on one of the coming days which includes some other adjustments as well by Casey Neehouse).
I tried replacing the DLL with the one in your zip file, but because it's for an existing project with lots of data in it already I just get exceptions on the view pages, "null reference exception", ( I guess because my viewport size is not set ) and when I try and configure the viewport size in the data type window I get a "KeyNotFoundException" (bottom).
Suggestion 1) Tweak the DataType page to allow upgraded projects to enter values for keys that did not exist before.
Suggestion 2) in my image cropper I calculated the viewport size from the window size, to try and fill up the screen like so, could be a nice addition?
We also noticed that when you do use the updated DLL there is a problem with crops not being correct when the image was resized to fit the viewport. I doesnt seem to take into account the scaling of the image to fit the viewport when working out what the crop should be.
The bigger the image the more pronounced the issue.
Resize picture to fit viewing pane if image is huge?
One suggestion: if the uploaded image is of a rather large size (say 1000pixels by 1000pixels for example) it would be nice for the image to be scaled to a sensible/manageable size so that you don't get scrollbars... therefore allowing the crop to be executed more easily. You could set the <img width and height to be 100% and limit the size within a containing div....but maybe still calculate the containing div's aspect ratio from the original image?
I am pretty sure that ImageGen Pro allows you to scale down if the image is larger than a certain dimension. Check it out.... http://our.umbraco.org/projects/imagegen
I was talking more specifically for the umbraco back end. Are you suggesting that I imageGen could be used together with the imagecropper datatype and the crop would still be taken from the original?
It's really hard to demostrate this problem.... I know imageGen is a breeze for image re-sizes on the front end (website) so hadn't thought about using it on the back end as well.... will give it a try... and see what happens.
Tim I know the problem you are talking about. Having such a large original image simply doesnt fit into the right panel of umbraco and causes scroll bars to appear.
I think it is a good suggestion and agree that it is a pain to work with the scrollbars when trying to make the crop.
Warren
Did anyone manage to get a working solution to the large images displayed in the image cropper? Were you able to use ImageGen to resize to a manageable size for cropping?
Thomas actually implemented support for specifying a "viewport" (jCrop feature):
http://kenny.no/downloads/viewport_config.PNG
http://kenny.no/downloads/viewport_crop.PNG
This will be part of v4.1, but I've prepared an updated dll for you here:
http://kenny.no/downloads/Kenny.Umbraco.DataTypes.ImageCropper.098.zip
(I'll update the "official" stand alone Image Cropper package with this dll on one of the coming days which includes some other adjustments as well by Casey Neehouse).
That's perfect, thanks Kenneth!
Hi Kenny
I tried replacing the DLL with the one in your zip file, but because it's for an existing project with lots of data in it already I just get exceptions on the view pages, "null reference exception", ( I guess because my viewport size is not set ) and when I try and configure the viewport size in the data type window I get a "KeyNotFoundException" (bottom).
Suggestion 1) Tweak the DataType page to allow upgraded projects to enter values for keys that did not exist before.
Suggestion 2) in my image cropper I calculated the viewport size from the window size, to try and fill up the screen like so, could be a nice addition?
Love your work :-)
Cheers.
Murray.
---exception---
Hi kenny
We also noticed that when you do use the updated DLL there is a problem with crops not being correct when the image was resized to fit the viewport. I doesnt seem to take into account the scaling of the image to fit the viewport when working out what the crop should be.
The bigger the image the more pronounced the issue.
Other than that awesome cropper.
Peter
A crap, didn't test the patch properly obviously, sorry! I removed the updated DLLs for now.
@Murray: I really like your way of specifying the boxWidth and boxHeight. Might change to this approach instead actually...
Hi,
it seems the download link isn't working anymore? Any change this could be placed back online, I would like to test this!
thanks
please vote up this item in codeplex
http://umbraco.codeplex.com/workitem/30041
if anyone is interested in a quick fix:
http://our.umbraco.org/projects/backoffice-extensions/image-cropper/image-cropper/12370-jCrop-implementation?p=0#comment92035
The issue on CodePlex says it is fixed and closed ... so how do I get the fix? I have 4.7.1 installed.
Hi,
I think it was added after 4.7.1 which means it should be included with the upcoming 4.7.1.1
-Tom
I have tested it in 4.7.1.1 and it works :).
Jeroen
Happy Days!
is working on a reply...