UNPKG

@gutenye/ocr-browser

Version:

Guten OCR is a high accurate text detection (OCR) Javascript/Typescript library that runs on Node.js, Browser, React Native and C++. Based on PaddleOCR and ONNX runtime

12 lines (11 loc) 486 B
import { ImageRawBase } from '@gutenye/ocr-common'; import type { ImageRawData, LineImage, SizeOption } from '@gutenye/ocr-common'; export declare class ImageRaw extends ImageRawBase { #private; data: Uint8ClampedArray; static open(url: string): Promise<ImageRaw>; constructor({ data, width, height }: ImageRawData); write(path: string): Promise<void>; resize({ width, height }: SizeOption): Promise<this>; drawBox(lineImages: LineImage[]): Promise<this>; }