@pixzle/node
Node.js implementation of image fragmentation and restoration.
Install
bash
npm i @pixzle/nodeShuffle
ts
import pixzle from "@pixzle/node";
await pixzle.shuffle({
images: ["./input_1.png", "./input_2.png", "./input_3.png"],
outputDir: "./output/fragmented",
});Output:
txt
output
└── fragmented
├── img_1_fragmented.png
├── img_2_fragmented.png
├── img_3_fragmented.png
└── manifest.json| input 1 | input 2 | input 3 |
|---|---|---|
![]() | ![]() | ![]() |
| output 1 | output 2 | output 3 |
|---|---|---|
![]() | ![]() | ![]() |
Restore
ts
import pixzle from "@pixzle/node";
await pixzle.restore({
manifest: "./output/fragmented/manifest.json",
images: [
"./output/fragmented/img_1_fragmented.png",
"./output/fragmented/img_2_fragmented.png",
"./output/fragmented/img_3_fragmented.png",
],
outputDir: "./output/restored",
});Output:
txt
output
└── restored
├── img_1.png
├── img_2.png
└── img_3.png| restored 1 | restored 2 | restored 3 |
|---|---|---|
![]() | ![]() | ![]() |








