/* auto-generated by NAPI-RS */
/* eslint-disable */
/**
 * Downscale an oversized image so it fits both a byte budget (`maxBytes`, a
 * model's inline-image limit) and a longest-edge pixel cap (`maxDimension`),
 * off the JS thread. Resolves to `null` when the input cannot be decoded (or is
 * a decompression bomb) or cannot be made to fit. Prefers lossless PNG, falling
 * back to JPEG and progressive downscaling.
 */
export declare function shrinkImageToFit(input: Buffer, maxBytes: number, maxDimension: number): Promise<ShrunkImage | null>

/**
 * A shrunk image produced by `shrinkImageToFit`. `bytes` is guaranteed to be at
 * most the requested `maxBytes`; `contentType` is `"image/png"` or
 * `"image/jpeg"`.
 */
export interface ShrunkImage {
  bytes: Buffer
  contentType: string
}
