@pixzle/node 0.0.22 → 0.0.23

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.
Files changed (2) hide show
  1. package/README.md +90 -0
  2. package/package.json +10 -3
package/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # @pixzle/node
2
+
3
+ Node.js implementation of image fragmentation and restoration.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm i @pixzle/node
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import Pixzle from "@pixzle/node";
15
+ ```
16
+
17
+ **Shuffle**
18
+
19
+ ```ts
20
+ await Pixzle.shuffle({
21
+ // config: { /** FragmentationConfig */ },
22
+ imagePaths: [
23
+ "./input_1.png",
24
+ "./input_2.png",
25
+ "./input_3.png",
26
+ ],
27
+ outputDir: "./output/fragmented",
28
+ });
29
+ ```
30
+
31
+ <details>
32
+ <summary>Output:</summary>
33
+
34
+ ```
35
+ output
36
+ └── fragmented
37
+ ├── img_1_fragmented.png
38
+ ├── img_2_fragmented.png
39
+ ├── img_3_fragmented.png
40
+ └── manifest.json
41
+ ```
42
+
43
+ | input 1 | input 2 | input 3 |
44
+ |:-------:|:---------------:|:---------------:|
45
+ | ![](../../.docs/input_sample.png) | ![](../../.docs/input_sample_mono.png) | ![](../../.docs/input_sample_blue.png) |
46
+ | 500 x 500px (109KB) | 400 x 600px (4KB) | 600 x 400px (3KB) |
47
+
48
+ | output 1 | output 2 | output 3 |
49
+ |:-------:|:---------------:|:---------------:|
50
+ | ![](../../.docs/fragmented1/img_1_fragmented.png) | ![](../../.docs/fragmented1/img_2_fragmented.png) | ![](../../.docs/fragmented1/img_3_fragmented.png) |
51
+ | 504 x 504px (159KB) | 496 x 488px (39KB) | 496 x 488px (35KB) |
52
+
53
+ </details>
54
+
55
+ **Restore**
56
+
57
+ ```ts
58
+ await Pixzle.restore({
59
+ manifestPath: "./output/fragmented/manifest.json",
60
+ imagePaths: [
61
+ "./output/fragmented/img_1_fragmented.png",
62
+ "./output/fragmented/img_2_fragmented.png",
63
+ "./output/fragmented/img_3_fragmented.png",
64
+ ],
65
+ outputDir: "./output/restored",
66
+ });
67
+ ```
68
+
69
+ <details>
70
+ <summary>Output:</summary>
71
+
72
+ ```
73
+ output
74
+ └── restored
75
+ ├── img_1.png
76
+ ├── img_2.png
77
+ └── img_3.png
78
+ ```
79
+
80
+ | input 1 | input 2 | input 3 |
81
+ |:-------:|:---------------:|:---------------:|
82
+ | ![](../../.docs/fragmented1/img_1_fragmented.png) | ![](../../.docs/fragmented1/img_2_fragmented.png) | ![](../../.docs/fragmented1/img_3_fragmented.png) |
83
+ | 504 x 504px (159KB) | 496 x 488px (39KB) | 496 x 488px (35KB) |
84
+
85
+ | output 1 | output 2 | output 3 |
86
+ |:-------:|:---------------:|:---------------:|
87
+ | ![](../../.docs/restored1/img_1.png) | ![](../../.docs/restored1/img_2.png) | ![](../../.docs/restored1/img_3.png) |
88
+ | 500 x 500px (116KB) | 400 x 600px (2KB) | 600 x 400px (2KB) |
89
+
90
+ </details>
package/package.json CHANGED
@@ -1,13 +1,20 @@
1
1
  {
2
2
  "name": "@pixzle/node",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "Node.js implementation of image fragmentation and restoration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
10
- "keywords": [],
10
+ "keywords": [
11
+ "pixzle",
12
+ "image",
13
+ "fragmentation",
14
+ "restoration",
15
+ "shuffle",
16
+ "obfuscation"
17
+ ],
11
18
  "author": "tuki0918",
12
19
  "repository": {
13
20
  "type": "git",
@@ -21,7 +28,7 @@
21
28
  "dependencies": {
22
29
  "@tuki0918/seeded-shuffle": "^1.0.0",
23
30
  "jimp": "^1.6.0",
24
- "@pixzle/core": "0.0.22"
31
+ "@pixzle/core": "0.0.23"
25
32
  },
26
33
  "devDependencies": {
27
34
  "@types/node": "^22.10.2",