When the uploaded image width is to high it makes the preview area wrong. Therefor the cropping area will be wrong and the saved cropped image.
This is due to the fact that the outer containerwidth of the hidden image created by imagefield_crop is smaller than the uploaded imagewidth.
So the jquery.Jcrop.js gets the fault imagewidth when calculating the croparea.
I don't know how the inlinestyle width is set, but I suppose the hidden image get the container width if the container is smaller than the hidden image strangly. Have tried to set position:absolute on creation of image, but it screws up the cropping.
Then I went into jquery.Jcrop.js and found the options.trueSize property, wich is intended to set the trueSize of the image.
Setting the trueSize to be the same as the original image, helps the problem out.
If anyone can clear this issue out, please tell me why I shouldn't use trueSize ?
Have added a patch that helped me fix the problem.
Comment | File | Size | Author |
---|---|---|---|
imagefield_crop.js_.patch | 660 bytes | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #2
Christophe Bourgois CreditAttribution: Christophe Bourgois commentedWorked for me also, thanks a lot !
Comment #4
ram4nd CreditAttribution: ram4nd as a volunteer commented