Stegano: LSB Image Steganography
Overview
Stegano is a pure-Python steganography library that hides text data inside PNG images by modifying the least significant bits of pixel values. The changes are imperceptible to the human eye, making it useful for watermarking, covert communication, and data embedding.
Quick Start
Embed a message:
bash
python scripts/embed_watermark.py --input image.png --output watermarked.png --watermark "secret message"
Extract a message:
bash
python scripts/extract_watermark.py --input watermarked.png --output message.txt
Scripts
scripts/embed_watermark.py
Embed a text watermark into a PNG image using LSB encoding.
bash
python scripts/embed_watermark.py --input <image.png> --output <output.png> --watermark <text>
Parameters:
- •
--input— Source PNG image path - •
--output— Output watermarked PNG path - •
--watermark— Text message to embed
scripts/extract_watermark.py
Extract a hidden text message from a steganographic PNG image.
bash
python scripts/extract_watermark.py --input <watermarked.png> --output <message.txt>
Parameters:
- •
--input— Watermarked PNG image path - •
--output— Output text file path
scripts/embed_hidden_text.py
Embed a predefined "hidden_text" watermark into an image.
bash
python scripts/embed_hidden_text.py --input <image.png> --output <output.png>
Important Notes
- •PNG only — JPEG compression destroys LSB data; always use PNG format
- •Capacity — Maximum message length depends on image dimensions (width × height bits available)
- •Dependency — Requires
steganopackage (pip install stegano)