Tuesday, 13 August 2013

What would be a good way to resize an image in either node or browser-side JavaScript?

What would be a good way to resize an image in either node or browser-side
JavaScript?

I'm uploading some image files (format can vary, though I can probably
restrict it if need be) to my server and storing them in a database as a
base64 encoded string. I'd like to create thumbnails from these images, so
that I'm not pulling down the full image when I only need a preview.
Most of the solutions out there involve reading from and writing to paths,
but I've got my data in memory. Is there a JavaScript or Node.js library
or technique out there for shrinking files as byte arrays or base64
strings?
Thank you.

No comments:

Post a Comment