views:

2385

answers:

9

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.

+4  A: 

I think you need Java or ActiveX for that. For example Thin Image Upload

jao
+3  A: 

Unfortunately you won't be able to resize the images in Javascript. It is possible in Silverlight 2 tho.

If you want to buy something already done: Aurigma Image Uploader is pretty impressive - $USD250 for the ActiveX and Java versions. There's some demos on the site, I'm pretty sure facebook use the same control.

russau
+3  A: 

What jao and russau say is true. The reason being is JavaScript does not have access to the local filesystem due to security reasons. If JavaScript could "see" your image files, it could see any file, and that is dangerous.

You need an application-level control to be able to do this, and that means Flash, Java or Active-X.

Diodeus
+5  A: 

You have several options:

  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.

My suggestion is find a solution which will do 80% of what you need and customize it to suit your needs.

digitalsanctum
A: 

Google Gears-based solution: GearsUploader

Mike Korobov
A: 

A very flexible resize before upload tool that works really well and has features no other tool has (currently at least): http://www.shift8creative.com/pages/projects/agile-uploader/index.html

Tom
A: 

There is multiple-technology-capable Plupload tool which declares that it can do resizing before upload, but I haven't tried it yet. I have also find a suitable answer in my question about binary image handling javascript libs.

calavera.info
A: 

I am looking to allow visitors to my site to resize and place their image on my canvas. The canvas will be the same size as how it will appear on my site. I uploaded a video of how I want to it to work at http://www.youtube.com/watch?v=pJVRcs-ZF2Q .. does anyone know the best way to approach this

Stephen