-
Notifications
You must be signed in to change notification settings - Fork 92
/
Copy pathimagemagick.d.ts
57 lines (47 loc) · 1.67 KB
/
imagemagick.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/// <reference path="node.d.ts" />
declare module "imagemagick" {
import child_process = require("child_process");
interface _identify {
(path: string, callback: (err: Error, features: Features) => void): child_process.ChildProcess;
(path: any[], callback: (err: Error, result: string) => void): child_process.ChildProcess;
path: string;
}
export var identify: _identify;
export function readMetadata(path: string, callback: (err: Error, result: any) => void): child_process.ChildProcess;
interface _convert {
(args: any, callback: (err, result) => void): child_process.ChildProcess;
(args: any, timeout: number, callback: (err, result) => void): child_process.ChildProcess;
path: string;
}
export var convert:_convert;
export function resize(options : Options, callback: (err, result) => void): child_process.ChildProcess;
export function crop(options : Options, callback: (err, result) => void): child_process.ChildProcess;
export function resizeArgs(options: Options) : ResizeArgs;
export interface Features {
format?: string;
width?: string;
height?: string;
depth?: string;
}
export interface Options {
srcPath?: string;//: null,
srcData?: string;//: null,
srcFormat?: string;//: null,
dstPath?: string;//: null,
quality?: number;//: 0.8,
format?: string;//: 'jpg',
progressive?: boolean;//: false,
colorspace?;//: null,
width?: number;//: 0,
height?: number;//: 0,
strip?: boolean;//: true,
filter?: string;//: 'Lagrange',
sharpening?: number;//: 0.2,
customArgs?: any[];//: [],
timeout?: number;//: 0
}
export interface ResizeArgs {
opt: Options;
args: string[];
}
}