Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocr-engine style #47

Merged
merged 2 commits into from
Jun 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ocr-engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export class OCREngine {
// Tesseract
const engineImage = new this._tesseractLib.Image(
imageData.width,
imageData.height
imageData.height,
);
const engineImageBuf = engineImage.data();
engineImageBuf.set(new Uint32Array(imageData.data.buffer));
Expand Down Expand Up @@ -262,7 +262,7 @@ export class OCREngine {
this._engine.getTextBoxes(textUnit, (progress: number) => {
onProgress?.(progress);
this._progressChannel?.postMessage({ progress });
})
}),
);
}

Expand Down Expand Up @@ -380,7 +380,7 @@ export type CreateOCREngineOptions = {
* used to create the tesseract module. Possible options are documented here:
* https://github.com/emscripten-core/emscripten/blob/1e7472362a7f5844c5bd23214d725b7a3fd18775/src/settings.js#L876
*/
emscriptenModuleOptions?: {wasmBinary: ArrayBuffer};
emscriptenModuleOptions?: { wasmBinary: ArrayBuffer };
};

/**
Expand Down