上传前调整图像大小 [英] Image resize before upload

查看:24
本文介绍了上传前调整图像大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为用户提供一种以 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.

推荐答案

您有几个选择:

  1. Java
  2. ActiveX(仅适用于 Windows)
  3. 银光
  4. Flash
  5. Flex
  6. Google Gears(最新版本能够调整大小并从桌面拖放)莉>
  1. Java
  2. ActiveX (only on windows)
  3. Silverlight
  4. Flash
  5. Flex
  6. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆