简体   繁体   English

图片上传,jCrop和Codeigniter

[英]Image upload and jCrop and codeigniter

I am trying to build a system that allows a user to select an image from their own computer, and crop it using the jCrop tool from jQuery. 我正在尝试构建一个系统,该系统允许用户从自己的计算机中选择图像,然后使用jQuery中的jCrop工具进行裁剪。 My question is can I show the image the user has selected from their system without uploading it to a system, I dont really want to do two uploads, unless I can do the first upload silently? 我的问题是我可以显示用户从他们的系统中选择的图像而不将其上传到系统吗,除非我可以无声地执行第一个上传,否则我真的不想进行两次上传吗? Any help would be great. 任何帮助都会很棒。

Thank you. 谢谢。

You don't have to upload twice. 您不必上传两次。 Just upload the image at first time 第一次上传图片

Use jCrop and send image Thumbnail's coordinates(x,y), width and height. 使用jCrop并发送图像Thumbnail的坐标(x,y),宽度和高度。

Resize Image according to them 根据他们调整图像大小

AFAIK, not using JavaScript and HTML (4) at the moment. AFAIK,目前未使用JavaScript和HTML(4)。

Flash can do image processing before upload - SWFUpload for example can resize images before uploading (doesn't support cropping though), but I don't know an Open Source implementation of a Cropping tool in Flash. Flash可以在上传之前进行图像处理-例如, SWFUpload可以在上传之前调整图像的大小(尽管不支持裁剪),但是我不知道Flash中的裁剪工具的开源实现。

It will probably also be possible using HTML 5. 使用HTML 5可能也有可能。

However, I don't see how you would need two uploads to do this? 但是,我看不到您怎么需要两次上传才能做到这一点? Isn't it 1. Upload 2. Show with Cropper 3. send Crop info to PHP script that processes the uploaded file? 是不是1.上传2.使用Cropper显示3.将Crop信息发送到处理上传文件的PHP脚本?

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

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