Cat-Printer/www/main.d.ts
2021-09-07 18:08:08 +08:00

19 lines
694 B
TypeScript

declare interface ImagePrinter {
noticeElement: HTMLParagraphElement;
thresholdInput: HTMLInputElement;
bluetoothMACInput: HTMLInputElement;
deviceSelection: HTMLSelectElement;
refreshDeviceButton: HTMLButtonElement;
fileSelection: HTMLInputElement;
dummyImage: HTMLImageElement;
imagePreview: HTMLCanvasElement;
previewButton: HTMLButtonElement;
printButton: HTMLButtonElement;
monoMethod: Function;
}
declare function imageDataColorToMonoSquare(data: ImageData, threshold: number): ImageData;
declare function imageDataColorToMonoDiamond(data: ImageData, threshold: number): ImageData;
declare function imageDataMonoToPBM(data: ImageData): Blob;