views:

363

answers:

3

Since File API will enable access to the content of local files it is now possible to do image resize before upload (a fairly common task) without any additional technology like Flash or Silverlight. Except that I can't find any Javascript library that would be able to handle images in binary form. Is there any? Maybe there is some in Flashe's ECMA script that could be adapted, but I simply can't find anything.

A: 

Even if you do find something that understands images in pure javascript, you would still need the DOM to render it, making it incredibly slow.

Luca Matteis
I don't want to render it, just upload it via AJAX PUT or POST requests. I'm sure that uploading works since I'm already doing it in my app, I just want to spare my bandwidth by moving the resize computation from server to client.
calavera.info
+1  A: 

Don't know if this is what you want, but there are some scripts on Userscripts.org that handle images: http://userscripts.org/scripts/show/38736

jerone
+2  A: 

Although I haven't find such libs, I have found a way how to accomplish the described task:

Client side image resizing and upload with pure javascript. That's cool, isn't it?

calavera.info