Skip to main content

Hide and reveal data in PNG images using LSB steganography

Project description

pixelsteg

Hide arbitrary data inside PNG images using LSB steganography. No cloud, no accounts — pure Python.

pip install pixelsteg

Usage

# Check how much a PNG can hold
steg capacity photo.png

# Hide a file
steg hide secret.txt photo.png output.png

# Extract it
steg reveal output.png

# Write extracted data to a file
steg reveal output.png recovered.txt

# With a password (XOR encryption)
steg hide secret.txt photo.png output.png --password hunter2
steg reveal output.png --password hunter2

# Double capacity (2 bits per channel, slight quality loss)
steg hide secret.txt photo.png output.png --bits 2
steg reveal output.png --bits 2

How it works

Each pixel in a PNG has R, G, B channels (0–255). This tool replaces the least significant bit(s) of each channel with bits from your payload. A 1-bit change per channel is imperceptible to the human eye — a pixel at value 200 becoming 201 is invisible.

A small header (8 bytes: 4 magic + 4 length) is written first, then the payload follows. Optional XOR encryption scrambles the payload before writing.

Capacity: ~3 bits per pixel at 1 bit/channel. A 1000×1000 image holds ~366 KB.

Notes

  • Output must be PNG (lossless). JPEG would destroy the hidden bits.
  • Use --bits 2 for double capacity; pixels can shift by up to 3 — still very hard to see, but technically detectable with steganalysis tools.
  • The password is simple XOR — not cryptographically strong. Use it to obscure, not secure.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pixelsteg-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pixelsteg-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file pixelsteg-0.1.0.tar.gz.

File metadata

  • Download URL: pixelsteg-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for pixelsteg-0.1.0.tar.gz
Algorithm Hash digest
SHA256 75c936b800ec1a0f27a3c4dd0847d94dfd95358d9bb0eadc41bf28a4cd51c099
MD5 b02883af82845e37b054f86d04a4d1f1
BLAKE2b-256 d583033449f2ed6949a9e406e3d9e80f4e868750c40a401f3206a1b941d08820

See more details on using hashes here.

File details

Details for the file pixelsteg-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pixelsteg-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for pixelsteg-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e38e2be561ab95df423eee096be65def1dbc2bd29f8abd12e6ad039ab12a2a9d
MD5 7c88df976dccacc1f439978941cb9c7e
BLAKE2b-256 d7fc7fca664454b62df6f90e4365c6f08cfe74a882e90aba0d7a71d8e4b8104b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page