A command-line tool for encoding and decoding secret messages in PNG files. This tool allows you to add, retrieve, and manage hidden text messages within PNG files without affecting their visual appearance.
- Encode secret messages into PNG files
- Decode hidden messages from PNG files
- Remove hidden messages from PNG files
- Print information about PNG chunks
- Preserves original image quality
- Support for custom chunk types
Make sure you have Rust installed on your system. If not, install it from rustup.rs.
Clone the repository:
git clone https://github.com/Gmin2/cli-png.git
cd png-cliBuild the project:
cargo build --releaseThe binary will be available at target/release/pngme
Encode a Message:
Add a secret message to a PNG file:
pngme encode <FILE_PATH> <CHUNK_TYPE> <MESSAGE> [OUTPUT_FILE]Example:
pngme encode ./image.png ruSt "This is a secret message!"With custom output file:
pngme encode ./image.png ruSt "This is a secret message!" -o ./output.pngDecode a Message: Read a hidden message from a PNG file:
pngme decode <FILE_PATH> <CHUNK_TYPE>Example:
pngme decode ./image.png ruStRemove a Message: Remove a hidden message from a PNG file:
pngme remove <FILE_PATH> <CHUNK_TYPE>Example:
pngme remove ./image.png ruStPrint Chunk Information: Print information about PNG chunks in a PNG file:
pngme info <FILE_PATH>Example:
pngme info ./image.pngTest can be run with:
cargo test