import type { BlobWithName } from './types'; export declare const resizeImage: (file: T, limits: { max1: number; max2: number; }) => Promise; /** * Resizes an image while maintaining its aspect ratio, ensuring that both dimensions fit within the given constraints. * * The function takes two numeric constraints (`max1` and `max2`) and determines which one applies to the long side * and which one applies to the short side of the image. * * - If the image already fits within the constraints (both sides are within their respective limits), * it is returned unchanged. * - If both constraints are provided, the image is resized so that the long side matches its limit. * However, if this causes the short side to exceed its limit, the short side constraint is applied instead. * - If only one constraint is provided, it is applied to the longer side, and the other side is scaled proportionally. * - If both constraints are zero or negative, the original image is returned without modifications. * * @param blob - The original image as a `Blob` object. * @param limits - An object containing two numeric constraints, `max1` and `max2`. * - **`max1`** - One of the two size constraints. * - **`max2`** - The second size constraint. * **Note:** `max1` and `max2` are not tied to specific dimensions (width or height). * The function determines which one applies to the long side and which to the short side. * * @returns A promise that resolves to a new resized `Blob` object, or the original `Blob` if resizing is not needed. */ export declare const resizeBlob: (blob: T, limits: { max1: number; max2: number; }) => Promise;