带有上传器的 jQuery 图像裁剪器
我一直在尝试使用 这个网站。据我所知,这是一段非常好的代码,只是有几个问题。
我的主要问题是,如果我尝试上传一个大于 Firefox 中最大文件大小的文件,它会发送一个 javascript 警报,指出“错误”,它应该这样做,但随后会使 Firefox 崩溃,我必须物理结束该进程。
我的下一个问题是,当您上传图像并指定裁剪目标时,它实际上似乎并没有裁剪它,而只是调整图像大小以适合小区域。
我很乐意亲自研究代码,但我对 javascript 知之甚少,对 jQuery 几乎一无所知,但我对 php 了解相当多,所以这方面的事情应该不会太糟糕。
希望有人能帮忙, 内特.
I have been attempting to use a mashup of jquery plugins found on this website. as far as i can tell this is a pretty good peice of code, just have a couple of issues.
my main issue is that if i attempt to upload a file that is larger than the max file size in firefox it sends a javascript alert saying "error" which it is supposed to do but then crashes firefox and i have to physically end the process.
my next issue is that when you do upload an image and specify the crop target it doesnt actually seem to crop it rather just resize the the image to fit the samll region.
I would happily plough through the code myself but i know very little about javascript and next to nothing on jQuery, i do however know a fair bit about php so that side of things shouldnt be too bad.
hope someone can help,
Nate.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你无法在 Javascript 中调整图像大小 - 我想它所做的只是更改图像标签。您需要将调整大小坐标/高度/宽度发送到后端,然后在那里调整其大小。
You can't resize the image in Javascript - i imagine all it does is change the image tag. You need to send the resize coordinates/height/width to your backend and then resize it there.