imagescript 1.2.15 → 1.2.16
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/ImageScript.d.ts +223 -223
- package/ImageScript.js +1646 -1646
- package/LICENSE +619 -619
- package/README.md +46 -46
- package/bench/_.mjs +165 -165
- package/bench/all.mjs +3 -3
- package/bench/blur.mjs +58 -58
- package/bench/flip.mjs +62 -62
- package/bench/overlay.mjs +34 -34
- package/bench/package.json +6 -6
- package/bench/readme.md +63 -63
- package/bench/resize.mjs +51 -51
- package/codecs/LICENSE +20 -20
- package/codecs/lib.d.ts +49 -49
- package/codecs/lib.js +5 -5
- package/codecs/node/index.js +2 -2
- package/codecs/node/index.mjs +5 -5
- package/codecs/package.json +13 -13
- package/codecs/readme.md +37 -37
- package/package.json +41 -41
- package/png/node.js +1137 -1137
- package/png/src/crc.mjs +48 -48
- package/png/src/mem.mjs +23 -23
- package/png/src/png.mjs +254 -254
- package/png/src/zlib.mjs +617 -617
- package/tsconfig.json +21 -21
- package/utils/mem.js +25 -25
- package/v2/codecs/magic.js +24 -24
- package/v2/framebuffer.d.ts +66 -66
- package/v2/framebuffer.js +2352 -2352
- package/v2/framebuffer.mjs +125 -125
- package/v2/framebuffer.rs +1263 -1263
- package/v2/index.d.ts +83 -83
- package/v2/index.js +260 -260
- package/v2/ops/blur.mjs +302 -302
- package/v2/ops/color.mjs +276 -276
- package/v2/ops/crop.mjs +63 -63
- package/v2/ops/fill.mjs +32 -32
- package/v2/ops/flip.mjs +32 -32
- package/v2/ops/index.mjs +8 -8
- package/v2/ops/iterator.mjs +33 -33
- package/v2/ops/overlay.mjs +62 -62
- package/v2/ops/resize.mjs +165 -165
- package/v2/ops/rotate.mjs +116 -116
- package/v2/util/mem.mjs +23 -23
- package/wasm/node/font.js +141 -141
- package/wasm/node/gif.js +76 -76
- package/wasm/node/jpeg.js +91 -91
- package/wasm/node/png.js +49 -49
- package/wasm/node/svg.js +55 -55
- package/wasm/node/tiff.js +46 -46
package/codecs/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"license": "MIT",
|
|
3
|
-
"main": "lib.js",
|
|
4
|
-
"version": "0.0.1",
|
|
5
|
-
"types": "lib.d.ts",
|
|
6
|
-
"name": "@imagescript/codecs",
|
|
7
|
-
"description": "fast codecs bindings for node and browsers",
|
|
8
|
-
"author": "imagescript (https://github.com/matmen/imagescript)",
|
|
9
|
-
"bugs": { "url": "https://github.com/matmen/imagescript/issues" },
|
|
10
|
-
"homepage": "https://github.com/matmen/ImageScript/blob/master/codecs/readme.md",
|
|
11
|
-
"repository": { "type": "git", "url": "git+https://github.com/matmen/imagescript.git" },
|
|
12
|
-
"exports": { ".": [{ "import": "./lib.mjs", "require": "./lib.js" }, "./lib.js"], "./*": "./*" },
|
|
13
|
-
"keywords": ["png", "jpg", "gif", "jpeg", "webp", "fast", "wasm", "codecs", "native", "bindings"]
|
|
1
|
+
{
|
|
2
|
+
"license": "MIT",
|
|
3
|
+
"main": "lib.js",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"types": "lib.d.ts",
|
|
6
|
+
"name": "@imagescript/codecs",
|
|
7
|
+
"description": "fast codecs bindings for node and browsers",
|
|
8
|
+
"author": "imagescript (https://github.com/matmen/imagescript)",
|
|
9
|
+
"bugs": { "url": "https://github.com/matmen/imagescript/issues" },
|
|
10
|
+
"homepage": "https://github.com/matmen/ImageScript/blob/master/codecs/readme.md",
|
|
11
|
+
"repository": { "type": "git", "url": "git+https://github.com/matmen/imagescript.git" },
|
|
12
|
+
"exports": { ".": [{ "import": "./lib.mjs", "require": "./lib.js" }, "./lib.js"], "./*": "./*" },
|
|
13
|
+
"keywords": ["png", "jpg", "gif", "jpeg", "webp", "fast", "wasm", "codecs", "native", "bindings"]
|
|
14
14
|
}
|
package/codecs/readme.md
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
# fast codecs bindings for node and browsers
|
|
2
|
-
|
|
3
|
-
`npm i @imagescript/codecs`
|
|
4
|
-
|
|
5
|
-
```js
|
|
6
|
-
import { png } from '@imagescript/codecs';
|
|
7
|
-
|
|
8
|
-
const rgba = new Uint32Array(256 * 256);
|
|
9
|
-
const image = png.encode(rgba, { width: 256, height: 256 });
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## supported platforms
|
|
13
|
-
| | node@10 | node@12 | node@14 | node@16 |
|
|
14
|
-
| ---------------- | ------- | ------- | ------- | ------- |
|
|
15
|
-
| wasm32 | ✕ | ✕ | ✕ | ✕ |
|
|
16
|
-
| macos x64 | ✓ | ✓ | ✓ | ✓ |
|
|
17
|
-
| macos arm64 | ✓ | ✓ | ✓ | ✓ |
|
|
18
|
-
| windows x64 | ✓ | ✓ | ✓ | ✓ |
|
|
19
|
-
| linux x64 gnu | ✓ | ✓ | ✓ | ✓ |
|
|
20
|
-
| linux arm64 gnu | ✓ | ✓ | ✓ | ✓ |
|
|
21
|
-
|
|
22
|
-
you can force usage of wasm by setting `CODECS_FORCE_WASM` env variable
|
|
23
|
-
|
|
24
|
-
for deno and browsers use `@imagescript/codecs/wasm/bundle/browser.js` [cdn](https://unpkg.com/@imagescript/codecs/wasm/bundle/browser.js)
|
|
25
|
-
|
|
26
|
-
## benchmarks
|
|
27
|
-
|
|
28
|
-
image used for benchmarks: `new framebuffer(width, height).fill((x, y) => x * y)`
|
|
29
|
-
|
|
30
|
-

|
|
31
|
-
|
|
32
|
-

|
|
33
|
-
|
|
34
|
-

|
|
35
|
-
|
|
36
|
-
## License
|
|
37
|
-
|
|
1
|
+
# fast codecs bindings for node and browsers
|
|
2
|
+
|
|
3
|
+
`npm i @imagescript/codecs`
|
|
4
|
+
|
|
5
|
+
```js
|
|
6
|
+
import { png } from '@imagescript/codecs';
|
|
7
|
+
|
|
8
|
+
const rgba = new Uint32Array(256 * 256);
|
|
9
|
+
const image = png.encode(rgba, { width: 256, height: 256 });
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## supported platforms
|
|
13
|
+
| | node@10 | node@12 | node@14 | node@16 |
|
|
14
|
+
| ---------------- | ------- | ------- | ------- | ------- |
|
|
15
|
+
| wasm32 | ✕ | ✕ | ✕ | ✕ |
|
|
16
|
+
| macos x64 | ✓ | ✓ | ✓ | ✓ |
|
|
17
|
+
| macos arm64 | ✓ | ✓ | ✓ | ✓ |
|
|
18
|
+
| windows x64 | ✓ | ✓ | ✓ | ✓ |
|
|
19
|
+
| linux x64 gnu | ✓ | ✓ | ✓ | ✓ |
|
|
20
|
+
| linux arm64 gnu | ✓ | ✓ | ✓ | ✓ |
|
|
21
|
+
|
|
22
|
+
you can force usage of wasm by setting `CODECS_FORCE_WASM` env variable
|
|
23
|
+
|
|
24
|
+
for deno and browsers use `@imagescript/codecs/wasm/bundle/browser.js` [cdn](https://unpkg.com/@imagescript/codecs/wasm/bundle/browser.js)
|
|
25
|
+
|
|
26
|
+
## benchmarks
|
|
27
|
+
|
|
28
|
+
image used for benchmarks: `new framebuffer(width, height).fill((x, y) => x * y)`
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
38
|
MIT © [evan](https://github.com/evanwashere) [matmen](https://github.com/matmen)
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "imagescript",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "zero-dependency javascript image manipulation",
|
|
5
|
-
"main": "ImageScript.js",
|
|
6
|
-
"types": "ImageScript.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "node ./tests/run.js",
|
|
9
|
-
"coverage": "nyc --reporter=html npm test"
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/matmen/ImageScript.git"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"image",
|
|
17
|
-
"image processing",
|
|
18
|
-
"image manipulation",
|
|
19
|
-
"png",
|
|
20
|
-
"jpeg",
|
|
21
|
-
"jpg",
|
|
22
|
-
"scale",
|
|
23
|
-
"resize",
|
|
24
|
-
"crop",
|
|
25
|
-
"webp",
|
|
26
|
-
"svg",
|
|
27
|
-
"bitmap",
|
|
28
|
-
"gif",
|
|
29
|
-
"picture",
|
|
30
|
-
"thumbnail"
|
|
31
|
-
],
|
|
32
|
-
"author": "Mathis Mensing <mathis@matmen.dev>",
|
|
33
|
-
"license": "AGPL-3.0-or-later",
|
|
34
|
-
"bugs": {
|
|
35
|
-
"url": "https://github.com/matmen/ImageScript/issues"
|
|
36
|
-
},
|
|
37
|
-
"homepage": "https://github.com/matmen/ImageScript#readme",
|
|
38
|
-
"engines": {
|
|
39
|
-
"node": ">=14.0.0"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "imagescript",
|
|
3
|
+
"version": "1.2.16",
|
|
4
|
+
"description": "zero-dependency javascript image manipulation",
|
|
5
|
+
"main": "ImageScript.js",
|
|
6
|
+
"types": "ImageScript.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "node ./tests/run.js",
|
|
9
|
+
"coverage": "nyc --reporter=html npm test"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/matmen/ImageScript.git"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"image",
|
|
17
|
+
"image processing",
|
|
18
|
+
"image manipulation",
|
|
19
|
+
"png",
|
|
20
|
+
"jpeg",
|
|
21
|
+
"jpg",
|
|
22
|
+
"scale",
|
|
23
|
+
"resize",
|
|
24
|
+
"crop",
|
|
25
|
+
"webp",
|
|
26
|
+
"svg",
|
|
27
|
+
"bitmap",
|
|
28
|
+
"gif",
|
|
29
|
+
"picture",
|
|
30
|
+
"thumbnail"
|
|
31
|
+
],
|
|
32
|
+
"author": "Mathis Mensing <mathis@matmen.dev>",
|
|
33
|
+
"license": "(AGPL-3.0-or-later OR MIT)",
|
|
34
|
+
"bugs": {
|
|
35
|
+
"url": "https://github.com/matmen/ImageScript/issues"
|
|
36
|
+
},
|
|
37
|
+
"homepage": "https://github.com/matmen/ImageScript#readme",
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=14.0.0"
|
|
40
|
+
}
|
|
41
|
+
}
|