Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
bin
test
.npmrc.enc
.travis.yml
LICENSE.md
README.md
index.js
package.json

README.md

ng-ocr

Build Status Downloads NPM-Version

Ngocr is an OCR library pure JavaScript for node.js. We use ocrad.js.

Install

$ npm install ng-ocr -S

How to use

image

Simple :

var Ngocr = require("Ngocr");
Ngocr.decodeFile("test/fixture/hello_world.png", function(error, data){
  console.log(data); // Hello World!
});

From Buffer:

var Ngocr = require("Ngocr");
var fs = require("fs");
var buffer = fs.readFileSync("test/fixture/hello_world.png");
Ngocr.decodeBuffer(buffer, function(error, data){
  console.log(data); // Hello World!
});

From Stream:

var Ngocr = require("Ngocr");
var fs = require("fs");
var stream = fs.createReadStream("test/fixture/hello_world.png");
Ngocr.decodeStream(stream, function(error, data){
  console.log(data); // Hello World!
});

Todo

  • JPG support
  • gif support
  • stream interface (i love pipe)
You can’t perform that action at this time.