jimp 1.3.0 → 1.4.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.
- package/dist/browser/index.d.ts +13 -3
- package/dist/browser/index.js +3 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/commonjs/index.d.ts +12 -2
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +12 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/esm/index.d.ts +12 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +33 -33
package/dist/browser/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ import * as flip from '@jimp/plugin-flip';
|
|
|
32
32
|
export { FlipOptions } from '@jimp/plugin-flip';
|
|
33
33
|
import * as mask from '@jimp/plugin-mask';
|
|
34
34
|
import * as print from '@jimp/plugin-print';
|
|
35
|
+
export { measureText, measureTextHeight } from '@jimp/plugin-print';
|
|
35
36
|
import * as resize from '@jimp/plugin-resize';
|
|
36
37
|
export { ResizeOptions, ResizeStrategy, ScaleOptions, ScaleToFitOptions } from '@jimp/plugin-resize';
|
|
37
38
|
import * as rotate from '@jimp/plugin-rotate';
|
|
@@ -117,6 +118,14 @@ declare const defaultPlugins: ({
|
|
|
117
118
|
quantize<I extends _jimp_types.JimpClass>(image: I, options: quantize.QuantizeOptions): I;
|
|
118
119
|
})[];
|
|
119
120
|
declare const defaultFormats: (typeof _jimp_js_bmp__default | typeof msBmp | typeof gif | typeof _jimp_js_jpeg__default | typeof _jimp_js_png__default | typeof tiff)[];
|
|
121
|
+
/** Convenience object for getting the MIME types of the default formats */
|
|
122
|
+
declare const JimpMime: {
|
|
123
|
+
bmp: "image/bmp";
|
|
124
|
+
gif: "image/gif";
|
|
125
|
+
jpeg: "image/jpeg";
|
|
126
|
+
png: "image/png";
|
|
127
|
+
tiff: "image/tiff";
|
|
128
|
+
};
|
|
120
129
|
/**
|
|
121
130
|
* @class
|
|
122
131
|
*
|
|
@@ -337,7 +346,7 @@ declare const Jimp: {
|
|
|
337
346
|
image: any;
|
|
338
347
|
}, void, unknown>;
|
|
339
348
|
};
|
|
340
|
-
read(url: string): Promise<{
|
|
349
|
+
read(url: string | Buffer | ArrayBuffer): Promise<{
|
|
341
350
|
bitmap: _jimp_types.Bitmap;
|
|
342
351
|
background: number;
|
|
343
352
|
formats: _jimp_types.Format<any>[];
|
|
@@ -1440,7 +1449,7 @@ declare const Jimp: {
|
|
|
1440
1449
|
}> ? T_11 extends Record<Mime, infer O> ? O : never : never : never)>(path: `${string}.${Extension}`, options?: Options | undefined): Promise<void>;
|
|
1441
1450
|
clone<S extends {
|
|
1442
1451
|
new (options?: _jimp_core.JimpConstructorOptions): any;
|
|
1443
|
-
read(url: string): Promise<any & _jimp_core.JimpInstanceMethods<any, {
|
|
1452
|
+
read(url: string | Buffer | ArrayBuffer): Promise<any & _jimp_core.JimpInstanceMethods<any, {
|
|
1444
1453
|
blit<I extends _jimp_types.JimpClass>(image: I, options: blit.BlitOptions): I;
|
|
1445
1454
|
} & {
|
|
1446
1455
|
blur<I extends _jimp_types.JimpClass>(image: I, r: number): I;
|
|
@@ -1750,5 +1759,6 @@ declare const Jimp: {
|
|
|
1750
1759
|
} & {
|
|
1751
1760
|
quantize<I extends _jimp_types.JimpClass>(image: I, options: quantize.QuantizeOptions): I;
|
|
1752
1761
|
}>);
|
|
1762
|
+
type JimpInstance = InstanceType<typeof Jimp>;
|
|
1753
1763
|
|
|
1754
|
-
export { Jimp, defaultFormats, defaultPlugins };
|
|
1764
|
+
export { Jimp, type JimpInstance, JimpMime, defaultFormats, defaultPlugins };
|