trepmag / jrac

jQuery Resize And Crop (jrac) is a jQuery plugin that build a viewport around a given image permitting to visually resize an image and place a crop
GNU General Public License v2.0
137 stars 50 forks source link

How can I get the image/data of the cropped/resized area? #19

Open corneliutusnea opened 11 years ago

corneliutusnea commented 11 years ago

Hi, Is there a way to read back the cropped image using JS? I can see I can read the coordinates but I'd like the processed image.

Thanks, Corneliu.

alecguintu commented 11 years ago

I think you'd need to do it on your favorite language or any image processing like imagemagick using those coordinates given by jrac.

josnidhin commented 11 years ago

One way will be to use html5 canvas. Use use canvas drawImage and getImageData methods

trepmag commented 11 years ago

Hello, yes jrac only output crop/dimension coordinates.

Cheers, Cedric