UNPKG

@rockshin/react-image-annotation

Version:

An image annotation tool for ai project that manual annotation for images, easy to use!

15 lines (14 loc) 829 B
import { Editor, TLShapeId } from 'tldraw'; import { Annotation, LoadImageParams } from './types'; declare const getImage: (src: string) => Promise<{ src: string; width: number; height: number; type: string; }>; declare function makeSureShapeIsAtBottom(editor: Editor, shapeId: TLShapeId): void; declare const getRectangleAnnotations: (editor: Editor) => Annotation[]; declare const loadImageWithTimeout: (src: string) => Promise<unknown>; declare const loadImageForIndex: ({ imageIndex, images, setIsLoading, setImageLoadError, setImage, setUsedNumbers, setDeletedNumbers, onImageLoadError, }: LoadImageParams) => Promise<void>; declare const cleanUpEditor: (editor: Editor) => void; export { cleanUpEditor, getImage, getRectangleAnnotations, loadImageForIndex, loadImageWithTimeout, makeSureShapeIsAtBottom, };