UNPKG

react-mindee-js

Version:
29 lines (28 loc) 1.16 kB
import Konva from 'konva'; import { ImageData } from '../common/types'; import { Stage } from '..'; import { ImageBoundingBox, PointerPosition } from './../common/types'; export declare const dataURItoBlob: (dataURI: string) => Blob; export declare const prepareImage: (image: string) => Promise<string>; export declare const urlToBlob: (url: string) => Promise<Blob>; export declare const tiffToJpg: (blob: Blob) => Promise<string>; export declare const heicToJpg: (blob: Blob) => Promise<string>; export declare const computeImageBoundingBox: ({ clientWidth, clientHeight }: HTMLDivElement, imageObj: HTMLImageElement) => { scale: number; x: number; y: number; width: number; height: number; }; export declare const handleResizeImage: (stage: Konva.Stage | null, container: HTMLDivElement | null, { element, shape }: ImageData) => { scale: number; x: number; y: number; width: number; height: number; } | undefined; export declare const setStageBasedImagePosition: ({ imageBoundingBox, stage, newPosition, }: { imageBoundingBox: ImageBoundingBox; stage: Stage; newPosition: PointerPosition; }) => void;