Merge pull request #297 from antonrifco/master

support Buffer as Image input of TesseractWorker
master
jeromewu 5 years ago committed by GitHub
commit 42012d663a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/node/index.js

@ -34,7 +34,8 @@ const loadImage = (image) => {
})
.then(resp => resp.data);
}
return readFile(image);
if (Buffer.isBuffer( image) ) return new Promise(function(resolve, reject) { resolve(image); });
else return readFile(image);
};
/*

Loading…
Cancel
Save