New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nocr

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nocr

OCR library pure JavaScript

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

nocr

Build Status

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

Install

$ npm install nocr -S

How to use

image

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)

Keywords

OCR

FAQs

Package last updated on 13 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts