UNPKG

1.12 kBTypeScriptView Raw
1/**
2 * Returns information about an image.
3 *
4 * @param {string} filePath Path to the image file.
5 * @returns {Bluebird<IInfoResult>}
6 */
7export declare function info(filePath: string): Promise<IInfoResult>;
8export interface IInfoResult {
9 /**
10 * Type of file.
11 */
12 type: string;
13 /**
14 * The number of bits in a color sample within a pixel.
15 */
16 depth: number;
17 /**
18 * The width of the image.
19 */
20 width: number;
21 /**
22 * The height of the image.
23 */
24 height: number;
25 /**
26 * The filesize of the image in bytes.
27 */
28 size: number;
29 /**
30 * The density of the image.
31 */
32 density: IDensity;
33 /**
34 * The filename (excluding the path) of the image.
35 */
36 name: string;
37 /**
38 * The path to the image.
39 */
40 path: string;
41 /**
42 * Orientation of the image.
43 */
44 orientation: string;
45 /**
46 * Number of frames in image.
47 */
48 frames: number;
49 /**
50 * Any warnings that ImageMagick may have output.
51 */
52 warnings?: string;
53}
54export interface IDensity {
55 x: number;
56 y: number;
57}