jimp 1.1.5 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,10 +7,10 @@ export { JPEGOptions } from '@jimp/js-jpeg';
7
7
  import * as _jimp_js_bmp from '@jimp/js-bmp';
8
8
  import _jimp_js_bmp__default, { msBmp } from '@jimp/js-bmp';
9
9
  export { BmpColor, BmpCompression, EncodeOptions } from '@jimp/js-bmp';
10
- import * as _jimp_types from '@jimp/types';
11
- export { Bitmap, Edge, RGBAColor, RGBColor } from '@jimp/types';
12
10
  import * as _jimp_core from '@jimp/core';
13
11
  export { BlendMode, HorizontalAlign, JimpConstructorOptions, JimpSimpleConstructorOptions, RawImageData, VerticalAlign } from '@jimp/core';
12
+ import * as _jimp_types from '@jimp/types';
13
+ export { Bitmap, Edge, RGBAColor, RGBColor } from '@jimp/types';
14
14
  import gif from '@jimp/js-gif';
15
15
  import tiff from '@jimp/js-tiff';
16
16
  import * as blit from '@jimp/plugin-blit';
@@ -43,6 +43,80 @@ export { loadFont } from '@jimp/plugin-print/load-font';
43
43
  export { diff } from '@jimp/diff';
44
44
  export { colorDiff, cssColorToHex, intToRGBA, limit255, rgbaToInt } from '@jimp/utils';
45
45
 
46
+ declare const defaultPlugins: ({
47
+ blit<I extends _jimp_types.JimpClass>(image: I, options: blit.BlitOptions): I;
48
+ } | {
49
+ blur<I extends _jimp_types.JimpClass>(image: I, r: number): I;
50
+ gaussian<I extends _jimp_types.JimpClass>(image: I, r: number): I;
51
+ } | {
52
+ circle<I extends _jimp_types.JimpClass>(image: I, options?: circle.CircleOptions): I;
53
+ } | {
54
+ normalize<I extends _jimp_types.JimpClass>(image: I): I;
55
+ invert<I extends _jimp_types.JimpClass>(image: I): I;
56
+ brightness<I extends _jimp_types.JimpClass>(image: I, val: number): I;
57
+ contrast<I extends _jimp_types.JimpClass>(image: I, val: number): I;
58
+ posterize<I extends _jimp_types.JimpClass>(image: I, n: number): I;
59
+ greyscale<I extends _jimp_types.JimpClass>(image: I): I;
60
+ opacity<I extends _jimp_types.JimpClass>(image: I, f: number): I;
61
+ sepia<I extends _jimp_types.JimpClass>(image: I): I;
62
+ fade<I extends _jimp_types.JimpClass>(image: I, f: number): I;
63
+ convolution<I extends _jimp_types.JimpClass>(image: I, options: {
64
+ kernel: number[][];
65
+ edgeHandling?: _jimp_types.Edge | undefined;
66
+ } | number[][]): I;
67
+ opaque<I extends _jimp_types.JimpClass>(image: I): I;
68
+ pixelate<I extends _jimp_types.JimpClass>(image: I, options: number | {
69
+ size: number;
70
+ x?: number | undefined;
71
+ y?: number | undefined;
72
+ w?: number | undefined;
73
+ h?: number | undefined;
74
+ }): I;
75
+ convolute<I extends _jimp_types.JimpClass>(image: I, options: number[][] | {
76
+ kernel: number[][];
77
+ x?: number | undefined;
78
+ y?: number | undefined;
79
+ w?: number | undefined;
80
+ h?: number | undefined;
81
+ }): I;
82
+ color<I extends _jimp_types.JimpClass>(image: I, actions: color.ColorAction[]): I;
83
+ } | {
84
+ contain<I extends _jimp_types.JimpClass>(image: I, options: contain.ContainOptions): I;
85
+ } | {
86
+ cover<I extends _jimp_types.JimpClass>(image: I, options: cover.CoverOptions): I;
87
+ } | {
88
+ crop<I extends _jimp_types.JimpClass>(image: I, options: crop.CropOptions): I;
89
+ autocrop<I extends _jimp_types.JimpClass>(image: I, options?: crop.AutocropOptions): I;
90
+ } | {
91
+ displace<I extends _jimp_types.JimpClass>(image: I, options: displace.DisplaceOptions): I;
92
+ } | {
93
+ dither<I extends _jimp_types.JimpClass>(image: I): I;
94
+ } | {
95
+ fisheye<I extends _jimp_types.JimpClass>(image: I, options?: fisheye.FisheyeOptions): I;
96
+ } | {
97
+ flip<I extends _jimp_types.JimpClass>(image: I, options: flip.FlipOptions): I;
98
+ } | {
99
+ pHash<I extends _jimp_types.JimpClass>(image: I): string;
100
+ hash<I extends _jimp_types.JimpClass>(image: I, base?: number): string;
101
+ distanceFromHash<I extends _jimp_types.JimpClass>(image: I, compareHash: string): number;
102
+ } | {
103
+ mask<I extends _jimp_types.JimpClass>(image: I, options: mask.MaskOptions): I;
104
+ } | {
105
+ print<I extends _jimp_types.JimpClass>(image: I, { font, ...options }: print.PrintOptions & {
106
+ font: print.BmFont<I>;
107
+ }): I;
108
+ } | {
109
+ resize<I extends _jimp_types.JimpClass>(image: I, options: resize.ResizeOptions): I;
110
+ scale<I extends _jimp_types.JimpClass>(image: I, options: resize.ScaleOptions): I;
111
+ scaleToFit<I extends _jimp_types.JimpClass>(image: I, options: resize.ScaleToFitOptions): I;
112
+ } | {
113
+ rotate<I extends _jimp_types.JimpClass>(image: I, options: rotate.RotateOptions): I;
114
+ } | {
115
+ threshold<I extends _jimp_types.JimpClass>(image: I, options: threshold.ThresholdOptions): I;
116
+ } | {
117
+ quantize<I extends _jimp_types.JimpClass>(image: I, options: quantize.QuantizeOptions): I;
118
+ })[];
119
+ declare const defaultFormats: (typeof _jimp_js_bmp__default | typeof msBmp | typeof gif | typeof _jimp_js_jpeg__default | typeof _jimp_js_png__default | typeof tiff)[];
46
120
  /**
47
121
  * @class
48
122
  *
@@ -116,8 +190,11 @@ declare const Jimp: {
116
190
  bitmap: _jimp_types.Bitmap;
117
191
  background: number;
118
192
  formats: _jimp_types.Format<any>[];
193
+ mime?: string;
119
194
  inspect(): string;
120
195
  toString(): string;
196
+ readonly width: number;
197
+ readonly height: number;
121
198
  getBuffer<ProvidedMimeType extends "image/bmp" | "image/tiff" | "image/x-ms-bmp" | "image/gif" | "image/jpeg" | "image/png", Options extends (Record<"image/bmp", {
122
199
  palette?: _jimp_js_bmp.BmpColor[] | undefined;
123
200
  colors?: number | undefined;
@@ -264,8 +341,11 @@ declare const Jimp: {
264
341
  bitmap: _jimp_types.Bitmap;
265
342
  background: number;
266
343
  formats: _jimp_types.Format<any>[];
344
+ mime?: string;
267
345
  inspect(): string;
268
346
  toString(): string;
347
+ readonly width: number;
348
+ readonly height: number;
269
349
  getBuffer<ProvidedMimeType extends "image/bmp" | "image/tiff" | "image/x-ms-bmp" | "image/gif" | "image/jpeg" | "image/png", Options extends (Record<"image/bmp", {
270
350
  palette?: _jimp_js_bmp.BmpColor[] | undefined;
271
351
  colors?: number | undefined;
@@ -411,8 +491,11 @@ declare const Jimp: {
411
491
  bitmap: _jimp_types.Bitmap;
412
492
  background: number;
413
493
  formats: _jimp_types.Format<any>[];
494
+ mime?: string;
414
495
  inspect(): string;
415
496
  toString(): string;
497
+ readonly width: number;
498
+ readonly height: number;
416
499
  getBuffer<ProvidedMimeType extends "image/bmp" | "image/tiff" | "image/x-ms-bmp" | "image/gif" | "image/jpeg" | "image/png", Options extends (Record<"image/bmp", {
417
500
  palette?: _jimp_js_bmp.BmpColor[] | undefined;
418
501
  colors?: number | undefined;
@@ -631,8 +714,11 @@ declare const Jimp: {
631
714
  bitmap: _jimp_types.Bitmap;
632
715
  background: number;
633
716
  formats: _jimp_types.Format<any>[];
717
+ mime?: string;
634
718
  inspect(): string;
635
719
  toString(): string;
720
+ readonly width: number;
721
+ readonly height: number;
636
722
  getBuffer<ProvidedMimeType extends ReturnType<typeof _jimp_js_bmp__default | typeof msBmp | typeof gif | typeof _jimp_js_jpeg__default | typeof _jimp_js_png__default | typeof tiff>["mime"], Options extends (Record<"image/bmp", {
637
723
  palette?: _jimp_js_bmp.BmpColor[] | undefined;
638
724
  colors?: number | undefined;
@@ -851,8 +937,11 @@ declare const Jimp: {
851
937
  bitmap: _jimp_types.Bitmap;
852
938
  background: number;
853
939
  formats: _jimp_types.Format<any>[];
940
+ mime?: string;
854
941
  inspect(): string;
855
942
  toString(): string;
943
+ readonly width: number;
944
+ readonly height: number;
856
945
  getBuffer<ProvidedMimeType extends "image/bmp" | "image/tiff" | "image/x-ms-bmp" | "image/gif" | "image/jpeg" | "image/png", Options extends (Record<"image/bmp", {
857
946
  palette?: _jimp_js_bmp.BmpColor[] | undefined;
858
947
  colors?: number | undefined;
@@ -998,8 +1087,11 @@ declare const Jimp: {
998
1087
  bitmap: _jimp_types.Bitmap;
999
1088
  background: number;
1000
1089
  formats: _jimp_types.Format<any>[];
1090
+ mime?: string;
1001
1091
  inspect(): string;
1002
1092
  toString(): string;
1093
+ readonly width: number;
1094
+ readonly height: number;
1003
1095
  getBuffer<ProvidedMimeType extends "image/bmp" | "image/tiff" | "image/x-ms-bmp" | "image/gif" | "image/jpeg" | "image/png", Options extends (Record<"image/bmp", {
1004
1096
  palette?: _jimp_js_bmp.BmpColor[] | undefined;
1005
1097
  colors?: number | undefined;
@@ -1218,8 +1310,11 @@ declare const Jimp: {
1218
1310
  bitmap: _jimp_types.Bitmap;
1219
1311
  background: number;
1220
1312
  formats: _jimp_types.Format<any>[];
1313
+ mime?: string;
1221
1314
  inspect(): string;
1222
1315
  toString(): string;
1316
+ readonly width: number;
1317
+ readonly height: number;
1223
1318
  getBuffer<ProvidedMimeType extends "image/bmp" | "image/tiff" | "image/x-ms-bmp" | "image/gif" | "image/jpeg" | "image/png", Options extends (Record<"image/bmp", {
1224
1319
  palette?: _jimp_js_bmp.BmpColor[] | undefined;
1225
1320
  colors?: number | undefined;
@@ -1656,4 +1751,4 @@ declare const Jimp: {
1656
1751
  quantize<I extends _jimp_types.JimpClass>(image: I, options: quantize.QuantizeOptions): I;
1657
1752
  }>);
1658
1753
 
1659
- export { Jimp };
1754
+ export { Jimp, defaultFormats, defaultPlugins };