SuperNinja
SuperNinja

Reputation: 1596

Cropping a small version of image, while editing original

I am creating a gallery that checks images, making sure they are sized correctly. If the image size is incorrect a marker is placed on the image and the user must edit. When user clicks on image a modal is called that contains selected image. The image size in the modal may not be 100% of the original so any sort of jQuery or JS cropping tool I use is not going to allow me to size based on the original image.

Any ideas on approach for cropping the 'reduced' size image and modifying the original proportionally?

I have the naturalHeight and naturalWidth of the original image, but unless I can find a practical approach of using a smaller size image to do some sort of comparison crop, the modal approach doesn't appear feasible.

Any help or tools to address this issue would be a great help.

Thanks!

Upvotes: 1

Views: 187

Answers (1)

frosty
frosty

Reputation: 21762

I built something similar and Jcrop worked like a charm. It takes into consideration the difference between the original height/width and the displayed height/width. Check it out. http://deepliquid.com/content/Jcrop.html

Upvotes: 1

Related Questions