1 | import { IBaseOptions } from "../options";
|
2 | import { IInfoResult } from "./info";
|
3 | /**
|
4 | * Crops an image.
|
5 | *
|
6 | * @param {ICropOptions} options
|
7 | * @returns {Bluebird<IInfoResult>}
|
8 | */
|
9 | export declare function crop(options: ICropOptions): Promise<IInfoResult>;
|
10 | export interface ICropOptions extends IBaseOptions {
|
11 | /**
|
12 | * Width of cropped image.
|
13 | */
|
14 | cropWidth: number;
|
15 | /**
|
16 | * Height of cropped image.
|
17 | * @default cropWidth
|
18 | */
|
19 | cropHeight?: number;
|
20 | /**
|
21 | * Width of cropped image.
|
22 | * @deprecated
|
23 | */
|
24 | cropwidth?: number;
|
25 | /**
|
26 | * Height of cropped image.
|
27 | * @deprecated
|
28 | */
|
29 | cropheight?: number;
|
30 | /**
|
31 | * Gravity for crop.
|
32 | * @see https://www.imagemagick.org/script/command-line-options.php#gravity
|
33 | */
|
34 | gravity?: string;
|
35 | /**
|
36 | * Left distance of crop
|
37 | * @default 0
|
38 | */
|
39 | x?: number;
|
40 | /**
|
41 | * Top distance of crop
|
42 | * @default 0
|
43 | */
|
44 | y?: number;
|
45 | }
|