简体   繁体   中英

How to get coordinates of the cropped image using ngImgCrop

I am using ngImgCrop directive to crop images in my application. As a first step, the actual image gets uploaded to the server as soon as the user selects it. The second step is to crop it. I need to know the coordinates of the cropped image to send it to server so that it crops the image based on the coordinates. Is it possible to get the coordinates of the cropped image? Please let me know

You can do the cropping in the browser before it gets uploaded, I have done it using Danial Farid's angular file upload

https://github.com/danialfarid/ng-file-upload

and ngCroppie,

https://allenroyston.herokuapp.com/access/acr-croppie/

It's a wrapper for Foliotek's Croppie

http://foliotek.github.io/Croppie/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM