Skip to content

Instantly share code, notes, and snippets.

@TimLang
Created April 29, 2014 02:12
Show Gist options
  • Save TimLang/11389179 to your computer and use it in GitHub Desktop.
Save TimLang/11389179 to your computer and use it in GitHub Desktop.
nodejs image base64 encoding and decoding
var encoded = new Buffer(imagedata, 'binary').toString('base64');
var decoded = new Buffer(encoded, 'base64').toString('binary');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment