jimp 1.4.0 → 1.6.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/README.md +41 -0
- package/dist/browser/index.d.ts +4 -4
- package/dist/browser/index.js +3 -3
- package/dist/browser/index.js.map +1 -1
- package/dist/commonjs/index.d.ts +4 -4
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.d.ts.map +1 -1
- package/package.json +33 -33
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img width="200" height="200"
|
|
3
|
+
src="https://s3.amazonaws.com/pix.iemoji.com/images/emoji/apple/ios-11/256/crayon.png">
|
|
4
|
+
<h1>Jimp</h1>
|
|
5
|
+
<p>JavaScript Image Manipulation Program</p>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
The "JavaScript Image Manipulation Program" :-)
|
|
9
|
+
|
|
10
|
+
An image processing library for Node written entirely in JavaScript, with zero native dependencies.
|
|
11
|
+
|
|
12
|
+
The default jimp configuration.
|
|
13
|
+
|
|
14
|
+
Supported types:
|
|
15
|
+
|
|
16
|
+
- `@jimp/jpeg`
|
|
17
|
+
- `@jimp/png`
|
|
18
|
+
- `@jimp/bmp`
|
|
19
|
+
- `@jimp/tiff`
|
|
20
|
+
- `@jimp/gif`
|
|
21
|
+
|
|
22
|
+
[Read the full docs.](http://jimp-dev.github.io/jimp/)
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install --save jimp
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
const { Jimp } = require("jimp");
|
|
34
|
+
|
|
35
|
+
// open a file called "lenna.png"
|
|
36
|
+
const image = await Jimp.read("test.png");
|
|
37
|
+
|
|
38
|
+
image.resize(256, 256); // resize
|
|
39
|
+
|
|
40
|
+
await image.write("test-small.jpg"); // save
|
|
41
|
+
```
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -346,7 +346,7 @@ declare const Jimp: {
|
|
|
346
346
|
image: any;
|
|
347
347
|
}, void, unknown>;
|
|
348
348
|
};
|
|
349
|
-
read(url: string | Buffer | ArrayBuffer): Promise<{
|
|
349
|
+
read(url: string | Buffer | ArrayBuffer, options?: Record<"image/tiff", Record<string, any> | undefined> | Record<"image/gif", Record<string, any> | undefined> | Record<"image/bmp", _jimp_js_bmp.DecodeBmpOptions> | Record<"image/x-ms-bmp", _jimp_js_bmp.DecodeBmpOptions> | Record<"image/jpeg", _jimp_js_jpeg.DecodeJpegOptions> | Record<"image/png", _jimp_js_png.DecodePngOptions> | undefined): Promise<{
|
|
350
350
|
bitmap: _jimp_types.Bitmap;
|
|
351
351
|
background: number;
|
|
352
352
|
formats: _jimp_types.Format<any>[];
|
|
@@ -942,7 +942,7 @@ declare const Jimp: {
|
|
|
942
942
|
} & {
|
|
943
943
|
quantize<I extends _jimp_types.JimpClass>(image: I, options: quantize.QuantizeOptions): I;
|
|
944
944
|
}>;
|
|
945
|
-
fromBuffer(buffer: Buffer | ArrayBuffer): Promise<{
|
|
945
|
+
fromBuffer(buffer: Buffer | ArrayBuffer, options?: Record<"image/tiff", Record<string, any> | undefined> | Record<"image/gif", Record<string, any> | undefined> | Record<"image/bmp", _jimp_js_bmp.DecodeBmpOptions> | Record<"image/x-ms-bmp", _jimp_js_bmp.DecodeBmpOptions> | Record<"image/jpeg", _jimp_js_jpeg.DecodeJpegOptions> | Record<"image/png", _jimp_js_png.DecodePngOptions> | undefined): Promise<{
|
|
946
946
|
bitmap: _jimp_types.Bitmap;
|
|
947
947
|
background: number;
|
|
948
948
|
formats: _jimp_types.Format<any>[];
|
|
@@ -1449,7 +1449,7 @@ declare const Jimp: {
|
|
|
1449
1449
|
}> ? T_11 extends Record<Mime, infer O> ? O : never : never : never)>(path: `${string}.${Extension}`, options?: Options | undefined): Promise<void>;
|
|
1450
1450
|
clone<S extends {
|
|
1451
1451
|
new (options?: _jimp_core.JimpConstructorOptions): any;
|
|
1452
|
-
read(url: string | Buffer | ArrayBuffer): Promise<any & _jimp_core.JimpInstanceMethods<any, {
|
|
1452
|
+
read(url: string | Buffer | ArrayBuffer, options?: Record<"image/tiff", Record<string, any> | undefined> | Record<"image/gif", Record<string, any> | undefined> | Record<"image/bmp", _jimp_js_bmp.DecodeBmpOptions> | Record<"image/x-ms-bmp", _jimp_js_bmp.DecodeBmpOptions> | Record<"image/jpeg", _jimp_js_jpeg.DecodeJpegOptions> | Record<"image/png", _jimp_js_png.DecodePngOptions> | undefined): Promise<any & _jimp_core.JimpInstanceMethods<any, {
|
|
1453
1453
|
blit<I extends _jimp_types.JimpClass>(image: I, options: blit.BlitOptions): I;
|
|
1454
1454
|
} & {
|
|
1455
1455
|
blur<I extends _jimp_types.JimpClass>(image: I, r: number): I;
|
|
@@ -1595,7 +1595,7 @@ declare const Jimp: {
|
|
|
1595
1595
|
} & {
|
|
1596
1596
|
quantize<I extends _jimp_types.JimpClass>(image: I, options: quantize.QuantizeOptions): I;
|
|
1597
1597
|
}>;
|
|
1598
|
-
fromBuffer(buffer: Buffer | ArrayBuffer): Promise<any & _jimp_core.JimpInstanceMethods<any, {
|
|
1598
|
+
fromBuffer(buffer: Buffer | ArrayBuffer, options?: Record<"image/tiff", Record<string, any> | undefined> | Record<"image/gif", Record<string, any> | undefined> | Record<"image/bmp", _jimp_js_bmp.DecodeBmpOptions> | Record<"image/x-ms-bmp", _jimp_js_bmp.DecodeBmpOptions> | Record<"image/jpeg", _jimp_js_jpeg.DecodeJpegOptions> | Record<"image/png", _jimp_js_png.DecodePngOptions> | undefined): Promise<any & _jimp_core.JimpInstanceMethods<any, {
|
|
1599
1599
|
blit<I extends _jimp_types.JimpClass>(image: I, options: blit.BlitOptions): I;
|
|
1600
1600
|
} & {
|
|
1601
1601
|
blur<I extends _jimp_types.JimpClass>(image: I, r: number): I;
|