///
import sharp from 'sharp';
import { AttachmentOptions, ImageBreakpoints, ImageInfo, OptimizedOutput, BreakpointFormat, FileDimensions, BlurhashOptions } from '@ioc:Adonis/Addons/ResponsiveAttachment';
export declare const getMergedOptions: (options: AttachmentOptions) => AttachmentOptions;
export declare const bytesToKBytes: (bytes: number) => number;
export declare const getMetaData: (buffer: Buffer) => Promise;
export declare const getDimensions: (buffer: Buffer) => Promise;
/**
* Default thumbnail resize options
*/
export declare const THUMBNAIL_RESIZE_OPTIONS: {
width: number;
height: number;
fit: "inside";
};
export declare const resizeTo: (buffer: Buffer, options: AttachmentOptions, resizeOptions: sharp.ResizeOptions) => Promise;
export declare const breakpointSmallerThan: (breakpoint: number, { width, height }: FileDimensions) => boolean;
export declare const allowedFormats: Array;
export declare const canBeProcessed: (buffer: Buffer) => Promise;
export declare const generateBreakpoint: ({ key, imageData, breakpoint, options, }: {
key: keyof ImageBreakpoints | string;
imageData: ImageInfo;
breakpoint: number;
options: AttachmentOptions;
}) => Promise;
/**
* Generates the name for the attachment and prefixes
* the folder (if defined)
* @param payload
* @param payload.extname The extension name for the image
* @param payload.hash Hash string to use instead of a CUID
* @param payload.prefix String to prepend to the filename
* @param payload.options Attachment options
*/
export declare const generateName: ({ extname, fileName, hash, prefix, options, }: {
extname?: string | undefined;
fileName?: string | undefined;
hash?: string | undefined;
prefix: keyof ImageBreakpoints | 'original';
options?: AttachmentOptions | undefined;
}) => string;
export declare const optimize: (buffer: Buffer, options?: AttachmentOptions) => Promise;
export declare const generateThumbnail: (imageData: ImageInfo, options: AttachmentOptions) => Promise;
export declare const generateBreakpointImages: (imageData: ImageInfo, options: AttachmentOptions) => Promise<(BreakpointFormat | undefined)[]>;
export declare function getDefaultBlurhashOptions(options: AttachmentOptions | undefined): Required;
export declare function encodeImageToBlurhash(options: AttachmentOptions, imageBuffer?: Buffer): Promise;
export declare const detectHEIC: (buffer: Buffer) => false | {
ext: string;
mime: string;
};