jQuery 使用裁剪调整图像大小

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8176603/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 10:10:17  来源:igfitidea点击:

Image resize with Crop

jqueryresizecrop

提问by Clinton Green

I want to create a function that after an image upload, will allow a user to resize an image. But the image must be behind a crop frame and the user must be able to drag/move/resize the image behind the crop frame. enter image description hereHere is a screenshot of what I am thinking of.

我想创建一个功能,在图像上传后,将允许用户调整图像大小。但是图像必须在裁剪框后面,并且用户必须能够在裁剪框后面拖动/移动/调整图像大小。 在此处输入图片说明这是我所想的截图。

Please can anyone point me in the right direction. Thanks

请任何人都可以指出我正确的方向。谢谢

采纳答案by fncomp

I'd give JRACa look. Their demo pageseems to cover your use case almost exactly.

我想看看JRAC。他们的演示页面似乎几乎完全涵盖了您的用例。

回答by Nicolas

It's probably to late for response but try this if you want to do that automaticaly: http://code.google.com/p/resize-crop/

响应可能为时已晚,但如果您想自动执行此操作,请尝试此操作:http: //code.google.com/p/resize-crop/

回答by JoseLuis Torres

a little too late to find this question I had to write a plugin myself to solve the same problem, please take a look here https://github.com/joseluistorres/dragcropand let me know if you have any questions/comments/feedback.

找到这个问题有点晚了我不得不自己写一个插件来解决同样的问题,请看这里https://github.com/joseluistorres/dragcrop如果您有任何问题/评论/反馈,请告诉我.