interface BlazeDiffOptions { /** Color difference threshold (0.0-1.0). Lower = more strict. Default: 0.1 */ threshold?: number; /** Enable anti-aliasing detection to exclude AA pixels from diff count */ antialiasing?: boolean; /** Output only differences with transparent background */ diffMask?: boolean; /** PNG compression level (0-9, 0=fastest/largest, 9=slowest/smallest) */ compression?: number; /** JPEG quality (1-100). Default: 90 */ quality?: number; } type BlazeDiffResult = { match: true; } | { match: false; reason: "layout-diff"; } | { match: false; reason: "pixel-diff"; diffCount: number; diffPercentage: number; } | { match: false; reason: "file-not-exists"; file: string; }; /** * Compare two images (PNG or JPEG) and optionally generate a diff image. * * Uses native N-API bindings when available for ~10-100x better performance * on small images (no process spawn overhead). Falls back to execFile if * native bindings are unavailable. * * @example * ```ts * // With diff output * const result = await compare('expected.png', 'actual.png', 'diff.png'); * * // Without diff output (faster, just returns comparison result) * const result = await compare('expected.png', 'actual.png'); * * if (result.match) { * console.log('Images identical'); * } else if (result.reason === 'pixel-diff') { * console.log(`${result.diffCount} pixels differ`); * } * ``` */ declare function compare(basePath: string, comparePath: string, diffOutput?: string, options?: BlazeDiffOptions): Promise; /** Get the path to the blazediff binary for direct CLI usage. */ declare function getBinaryPath(): string; /** * Check if native N-API bindings are available. * Returns true if the native module loaded successfully. */ declare function hasNativeBinding(): boolean; export { type BlazeDiffOptions, type BlazeDiffResult, compare, getBinaryPath, hasNativeBinding };