| Crates.io | injet |
| lib.rs | injet |
| version | 0.3.0 |
| created_at | 2025-06-17 22:29:58.778341+00 |
| updated_at | 2025-07-11 11:21:50.640317+00 |
| description | Inject and extract files into PNG images using LSB (Least Significant Bit) method |
| homepage | |
| repository | https://github.com/deliro/injet |
| max_upload_size | |
| id | 1716363 |
| size | 86,636 |
Injet is a command-line tool that allows embedding arbitrary files into PNG images using the Least Significant Bit (LSB) method.
It can also retrieve embedded files and inspect image capacity for embedded data.
This tool is intended for educational, archival, and personal data embedding use cases.
To install Injet using Cargo:
cargo install injet
To embed a file into a PNG image:
injet inject some_file.txt some_image.png > output.png
If the image is not a PNG or uses a different color format than RGBA8,
it will be automatically converted.
| Flag/Option | Description | Default |
|---|---|---|
-d, --destination PATH |
Where to save the resulting image. If not set, writes to stdout (if not terminal), else "modified.png" | stdout or file |
-w, --write-meta BOOL |
Whether to write metadata (filename and size). If false, extraction requires --read-meta=false and --read-size. |
true |
--compression LEVEL |
PNG compression: default, fast, best. |
default |
--seed SEED |
Use a seed string for pseudorandom bit placement. Must match during extraction/inspection. | (none) |
To extract an embedded file from an image:
injet extract output.png
This will create the original file (e.g., some_file.txt) in the current directory.
| Flag/Option | Description | Default |
|---|---|---|
-d, --destination PATH |
Where to save the extracted file. If not set, uses filename from metadata or "cargo". | metadata/cargo |
--read-meta BOOL |
Whether to read metadata. If false, you must specify --read-size. |
true |
--read-size BYTES |
How many bytes to extract. If not set, uses metadata or extracts as much as possible. | metadata/max |
--seed SEED |
Seed string for pseudorandom data location. Must match the one used during injection. | (none) |
To check whether an image contains embedded data and to see the maximum supported file size:
injet inspect image.png
| Flag/Option | Description |
|---|---|
--seed SEED |
Seed string for pseudorandom data location. Must match the one used during injection. |
You can always see available commands and options using:
injet --help