1.2.0 • Published 8 years ago
nocr v1.2.0
nocr
nocr is an OCR library pure JavaScript for node.js. We use ocrad.js.
Install
$ npm install nocr -S
How to use
Simple :
var nocr = require("nocr");
nocr.decodeFile("test/fixture/hello_world.png", function(error, data){
console.log(data); // Hello World!
});
From Buffer:
var nocr = require("nocr");
var fs = require("fs");
var buffer = fs.readFileSync("test/fixture/hello_world.png");
nocr.decodeBuffer(buffer, function(error, data){
console.log(data); // Hello World!
});
From Stream:
var nocr = require("nocr");
var fs = require("fs");
var stream = fs.createReadStream("test/fixture/hello_world.png");
nocr.decodeStream(stream, function(error, data){
console.log(data); // Hello World!
});
Todo
- JPG support
- gif support
- stream interface (i love pipe)