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
| import { ImageCallback } from '@jimp/core';
|
| type ColorActionName =
| | 'mix'
| | 'tint'
| | 'shade'
| | 'xor'
| | 'red'
| | 'green'
| | 'blue'
| | 'hue';
|
| type ColorAction = {
| apply: ColorActionName;
| params: any;
| };
|
| interface Color {
| brightness(val: number, cb?: ImageCallback<this>): this;
| contrast(val: number, cb?: ImageCallback<this>): this;
| posterize(n: number, cb?: ImageCallback<this>): this;
| greyscale(cb?: ImageCallback<this>): this;
| grayscale(cb?: ImageCallback<this>): this;
| opacity(f: number, cb?: ImageCallback<this>): this;
| sepia(cb?: ImageCallback<this>): this;
| fade(f: number, cb?: ImageCallback<this>): this;
| convolution(kernel: number[][], cb?: ImageCallback<this>): this;
| convolution<T>(
| kernel: number[][],
| edgeHandling: string,
| cb?: ImageCallback<this>
| ): this;
| opaque(cb?: ImageCallback<this>): this;
| pixelate(size: number, cb?: ImageCallback<this>): this;
| pixelate(
| size: number,
| x: number,
| y: number,
| w: number,
| h: number,
| cb?: ImageCallback<this>
| ): this;
| convolute(kernel: number[][], cb?: ImageCallback<this>): this;
| convolute(
| kernel: number[][],
| x: number,
| y: number,
| w: number,
| h: number,
| cb?: ImageCallback<this>
| ): this;
| color(actions: ColorAction[], cb?: ImageCallback<this>): this;
| colour(actions: ColorAction[], cb?: ImageCallback<this>): this;
| }
|
| export default function(): Color;
|
|