import { Gifsicle } from "../gifsicle.js"; /** * Reduction kernels. */ export declare enum ReductionKernel { sample = "sample", mix = "mix", catrom = "catrom", mitchell = "mitchell", lanczos2 = "lanczos2", lanczos3 = "lanczos3" } /** * Position modes for cropping. */ export declare enum CroppingPosition { center = "center", top = "top", right = "right", bottom = "bottom", left = "left", topRight = "topRight", bottomRight = "bottomRight", bottomLeft = "bottomLeft", topLeft = "topLeft" } /** * Resize options. */ export type ResizeOptions = { kernel: ReductionKernel | undefined; withoutEnlargement: boolean | undefined; }; /** * Cropping options. */ export type CroppingOptions = { position: CroppingPosition | undefined; }; /** * Resize image to `width`, `height` or `width x height`. * * @param {Number} [width] - pixels wide the resultant image should be. Use `null` or `undefined` to auto-scale the width to match the height. * @param {Number} [height] - pixels high the resultant image should be. Use `null` or `undefined` to auto-scale the height to match the width. * @param {Object} [options] * @param {ReductionKernel} [options.kernel=ReductionKernel.lanczos3] - the kernel to use for image reduction. * @param {Boolean} [options.withoutEnlargement=false] - do not enlarge if the width *or* height are already less than the specified dimensions, equivalent to GraphicsMagick's `>` geometry option. * * @returns {Gifsicle} * @throws {TypeError} Invalid parameters */ export declare function resize(this: Gifsicle, width: number | undefined, height: number | undefined, options: ResizeOptions | undefined): Gifsicle; /** * Crop the image to `width x height`. * * @param {number} [width] - pixels wide the resultant image should be. * @param {number} [height] - pixels high the resultant image should be. * @param {Object} [options] * @param {CroppingPosition} [options.position=CroppingPosition.center] - position of the cropping rectangle. * @returns {Gifsicle} * @throws {TypeError} Invalid parameters */ export declare function crop(this: Gifsicle, width: number, height: number, options: CroppingOptions | undefined): Gifsicle; export declare function computeCroppingPoint(input: Buffer, crop: { width: number; height: number; position: CroppingPosition; }): { x: number; y: number; };