UNPKG

anon-canvas

Version:

**anon-zone** is a reusable React component for drawing and managing mask zones over images. It is designed for applications where anonymizing part of an image is required, such as hiding personal information on medical scans (e.g., ultrasounds).

17 lines (16 loc) 594 B
import { ComponentPropsWithoutRef } from 'react'; import { AnonZoneProps } from './anon-zone'; interface AnonCanvasProps extends Omit<ComponentPropsWithoutRef<"canvas">, "width" | "height"> { imageSrc: string; zones?: AnonZoneProps[]; zoneColor?: string; width?: number; height?: number; } export interface AnonCanvasApi { reset: () => void; toBlob: () => Promise<Blob | null>; toBase64: () => string | null; } export declare const AnonCanvas: import('react').ForwardRefExoticComponent<AnonCanvasProps & import('react').RefAttributes<AnonCanvasApi>>; export {};