UNPKG

723 BTypeScriptView Raw
1import { IBaseOptions } from "../options";
2import { IInfoResult } from "./info";
3/**
4 * Resizes an image.
5 *
6 * @param {IResizeOptions} options
7 * @returns {Bluebird<IInfoResult>}
8 */
9export declare function resize(options: IResizeOptions): Promise<IInfoResult>;
10export interface IResizeOptions extends IBaseOptions {
11 /**
12 * Width of resized image.
13 */
14 width: number;
15 /**
16 * Height of resized image.
17 * @default cropWidth
18 */
19 height?: number;
20 /**
21 * Ignore aspect ratio when resizing.
22 * @default false
23 */
24 ignoreAspectRatio?: boolean;
25 /**
26 * Only reduce the size of the image. Do not increase it.
27 * @default false
28 */
29 onlyDownscale?: boolean;
30}