Skip to content

Commit

Permalink
Try a scale of 5.0 instead of 6.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBone committed Jul 24, 2018
1 parent 7bb91df commit 924f90d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scraper.js
Expand Up @@ -370,7 +370,7 @@ async function parseImage(pdfUrl, image) {
// the image (because this significantly improves the OCR results, but also significantly
// increases memory usage).

jimpImage.crop(0, sectionY, image.width, sectionHeight).scale(6.0, jimp.RESIZE_BEZIER);
jimpImage.crop(0, sectionY, image.width, sectionHeight).scale(5.0, jimp.RESIZE_BEZIER);
let imageBuffer = await (new Promise((resolve, reject) => jimpImage.getBuffer(jimp.MIME_PNG, (error, buffer) => resolve(buffer))));

// Perform OCR on the image (this is extremely memory and CPU intensive).
Expand Down

0 comments on commit 924f90d

Please sign in to comment.