Search code examples
htmlfile-uploadgoogle-chrome-appgoogle-nativeclient

Does NaCl allow me to resize a photo before upload in the browser?


I'm trying to deliver a simple, browser-based solution to allow users to upload an entire folder of photos (including subfolders) to the server. Chrome >= 21 now allows me to offer drag-drop folders which is halfway there.

However, I'd also like to downsize photos to an arbitrary size, i.e. 720px, to allow for faster uploads. I'm currently using Imagemagick libs packaged in an Adobe AIR native installer app to get this done, but the native installer breaks the seamless install/launch/update features you get from AIR web apps - and it's not compatible with Chrome (see Air not supported in Pepper Flash)

Will NaCl/Pepper allow me to:

  1. EXIF tags and resize JPGs in the browser before I upload? Ideally, I could have access to ImageMagick libs from NaCl to do what I need (including --auto-orient)?
  2. also be compatible with HTML5+Chrome folder drag-drop from above

Solution

  • Yes, NaCl will allow C++ libraries to be run and ported. naclports ImageMagick is a top search result for image magick, and a good place to look first.