Browse Source

support buffer in Image of TesseractWorker

support buffer in Image of TesseractWorker
pull/297/head
antonrifco 6 years ago committed by GitHub
parent
commit
7566d3550f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/node/index.js

3
src/node/index.js

@ -34,7 +34,8 @@ const loadImage = (image) => {
}) })
.then(resp => resp.data); .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