简体   繁体   English

如何使用ngImgCrop获取裁剪图像的坐标

[英]How to get coordinates of the cropped image using ngImgCrop

I am using ngImgCrop directive to crop images in my application. 我正在使用ngImgCrop指令在应用程序中裁剪图像。 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 您可以在上传之前在浏览器中进行裁剪,我已经使用Danial Farid的角度文件上传完成了裁剪

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

and ngCroppie, 和ngCroppie,

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

It's a wrapper for Foliotek's Croppie 它是Foliotek的Croppie的包装纸

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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