Skip to content

Commit

Permalink
Fix a couple of code mistakes in the docs
Browse files Browse the repository at this point in the history
Fix a couple of issues found while looking into #92 (reply in thread).
  • Loading branch information
robertknight authored Jan 31, 2024
1 parent 3245203 commit ec65c4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function runOCR() {
// Fetch document image and decode it into an ImageBitmap.
const imageResponse = await fetch('./test-image.jpg');
const imageBlob = await imageResponse.blob();
const image = await createImageBitmap(image);
const image = await createImageBitmap(imageBlob);

// Initialize the OCR engine. This will start a Web Worker to do the
// work in the background.
Expand All @@ -72,7 +72,7 @@ async function runOCR() {
// process.
await ocr.loadModel('eng.traineddata');

await ocr.loadImage(someImage);
await ocr.loadImage(image);

// Perform text recognition and return text in reading order.
const text = await ocr.getText();
Expand Down

0 comments on commit ec65c4e

Please sign in to comment.