图像在上传前调整大小 [英] Image resize before upload
问题描述
我需要为用户提供一种手段,以jpeg格式将照片上传到他们的网站。但是,这些照片的原始尺寸非常大,我想在上传前调整大小选项对用户来说非常轻松。似乎我唯一的选择是客户端应用程序,它在通过Web服务上载照片之前调整照片大小,或者在上传操作上调整照片大小的客户端JavaScript挂钩。第二个选项是非常试验性的,因为我没有JavaScript图像大小调整库,并且很难让JavaScript运行我当前的调整大小工具ImageMagick。
I need to provide a means for a user to upload photos to their web site in jpeg format. However, the photos are very large in original size, and I would like to make the resize before upload option very effortless for the user. It seems my only options are a client side application that resizes the photos before uploading them via a web service, or a client side JavaScript hook on the upload operation that resizes the images. The second option is very tentative because I don't have a JavaScript image resizing library, and it will be difficult to get the JavaScript to run my current resize tool, ImageMagick.
我确信这种情况并不常见,并且会对这样做的网站提出一些建议或指示。
I'm sure this is not too uncommon a scenario, and some suggestions or pointers to sites that do this will be appreciated.
推荐答案
您有以下几种选择:
- Java
- ActiveX(仅限Windows)
- Silverlight
- Flash
- Flex
- Google Gears (最新版本能够调整大小并从桌面拖放)
- Java
- ActiveX (only on windows)
- Silverlight
- Flash
- Flex
- Google Gears (the most recent version is capable of resizing and drag and drop from your desktop)
我已经做了很多研究,寻找类似于你所描述的解决方案的解决方案。那里有很多解决方案,质量和灵活性各不相同。
I've done a lot of research looking for a similar solution to what you have described and there a lot of solutions out there that vary a lot in quality and flexibility.
我的建议是找到一个可以满足您需求的80%的解决方案,并根据您的需求进行定制。
My suggestion is find a solution which will do 80% of what you need and customize it to suit your needs.
这篇关于图像在上传前调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!