Skip to content

Instantly share code, notes, and snippets.

@podrezo
Created June 23, 2015 22:35
Show Gist options
  • Save podrezo/56a6073dd43d9fc0a529 to your computer and use it in GitHub Desktop.
Save podrezo/56a6073dd43d9fc0a529 to your computer and use it in GitHub Desktop.
ZBar Node.js QR Code
'use strict';
var exec = require('child_process').exec;
module.exports = function(callback) {
exec('"C:\\Program Files (x86)\\ZBar\\bin\\zbarimg.exe" --raw --quiet capture.png', function(err, stdout, stderr){
if(err) { return callback(err); }
return callback(null, stdout.substring(0,stdout.length-1));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment