/** * A cross-environment image {@link @nhtio/adk/batteries/media/contracts!MediaEngine} * backed by Jimp (pure JavaScript — no native bindings, no binaries). * * @module @nhtio/adk/batteries/media/engines/jimp * * @remarks * The local-by-default raster engine: runs anywhere TypeScript runs. Declares one mutate * capability over png/jpeg/bmp/gif/tiff with resize (cover/contain approximations), rotate, * flip, quality, and metadata stripping (Jimp re-encodes pixels, so EXIF never survives — * `strip_metadata` is inherently satisfied), plus a generation edge: `EMPTY_MIME` → a blank * 1024×1024 white canvas in any supported encoding (resize in the same statement — * `empty:png | image resize width=64`). For webp/avif output or native-speed processing, * compose a sharp-backed engine instead — the capability declaration is the seam. * * `jimp` is an optional peer dependency, lazily imported on first actual use (constructing * the engine — and therefore the pipeline — never loads it). */ import type * as JimpNS from 'jimp'; import type { MediaEngine } from "../contracts"; type JimpModule = typeof JimpNS; /** Options for {@link jimpEngine}. */ export interface JimpEngineOptions { /** Override the module resolution (tests / custom builds). Default: `import('jimp')`. */ jimp?: () => JimpModule | Promise; } /** * Construct the Jimp-backed image engine. * * @param options - Optional module resolver override. * @returns The engine. */ export declare const jimpEngine: (options?: JimpEngineOptions) => MediaEngine; export {};