type ImageFormat = 'png' | 'webp' | 'bmp' | 'jpeg' | 'gif';
interface Size {
    width: number;
    height: number;
}

/**
 * Compress, resize, or convert an image Blob/File.
 *
 * @param {Blob | File} imgBlob The image blob to manipulate.
 * @param {number} [quality=100] The image quality for JPEG/PNG (0-100).
 * @param {number | 'auto'} [width='auto] The desired width (`'auto'` for original).
 * @param {number | 'auto'} [height='auto] The desired height (`'auto'` for original).
 * @param {ImageFormat | null} [format=null] The desired image format (defaults to original format).
 * @param {string | null} [backgroundColor=null] Background color for PNG images (e.g., "#FFFFFF").
 * @returns {Promise<Blob>} A promise resolving to the processed image Blob.
 */
declare const fromBlob: (imgBlob: Blob | File, quality?: number, width?: number | "auto", height?: number | "auto", format?: ImageFormat | null, backgroundColor?: string | null) => Promise<Blob>;

/**
 * Compress, resize, or convert an image from a URL.
 *
 * @param {string} url The image URL.
 * @param {number} [quality=100] Image quality for conversion.
 * @param {(number | 'auto')} [width='auto'] Desired image width. If `'auto'`, calculates based on height scale.
 * @param {(number | 'auto')} [height='auto'] Desired image height. If `'auto'`, calculates based on width scale.
 * @param {ImageFormat} [format] Desired image format [png, webp, bmp, jpeg].
 * @param {RequestInit} [options] Fetch options for the URL.
 * @returns {Promise<Blob>} Promise resolving to the processed image blob.
 */
declare const fromURL: (url: string, quality?: number, width?: number | "auto", height?: number | "auto", format?: ImageFormat, options?: RequestInit) => Promise<Blob>;

/**
 * Convert File or Blob to DataURL
 *
 * @param {Blob | File} blob Blob or File to convert.
 * @returns {Promise<string | ArrayBuffer>} Promise resolving to a DataURL string.
 */
declare const blobToURL: (blob: Blob | File) => Promise<string | ArrayBuffer>;

/**
 * Convert URL to a Blob file.
 *
 * @param {string} url The image URL.
 * @param {RequestInit} [options] Fetch options (e.g., headers).
 * @returns {Promise<Blob>} Promise resolving to the fetched image blob.
 */
declare const urlToBlob: (url: string, options?: RequestInit) => Promise<Blob>;

export { type ImageFormat, type Size, blobToURL, fromBlob, fromURL, urlToBlob };
