is-printable

0.0.0 • Public • Published

isPrintable

Is the image big enough to be printed?

Example

var isPrintable = require('../index');
var fs = require('fs');
var path = require('path');

fs.readdir(__dirname, function(err, files){
  files.forEach(function (file) {
    if(path.extname(file) === '.jpg') {
      isPrintable(__dirname + '/' + file, [7.8, 9.8], function (err, result) {
        if(err) throw new Error(err);
        if(result === true) {
          console.log(file + " is good to print.");
        } else {
          console.log(file + " is not good enough to be printed");
        }
      });
    }
  })
})

Readme

Keywords

none

Package Sidebar

Install

npm i is-printable

Weekly Downloads

1

Version

0.0.0

License

MIT

Last publish

Collaborators

  • coolzilj