Skip to main content

Use steganography to hide data in images.

Project description

pyhide

Use steganography to hide data in images.

The Least Significant Bit method is used when a base image is provided, where the data will be written to the end of each pixel. More bits will be used depending on how much data is to be stored, and not providing a base image will force it to use all 8 bits.

These images must be saved as a lossless format (such as .PNG), and any resampling will lose the data. Some image hosts such as Imgur will not reformat the image if it's below a certain size, making it an ideal host to use for sharing.

Installation

pip install pyhide

Example Usage

# Simple image encode/decode
>>> encoded_image = PyHide(data).image_encode()
>>> data == PyHide.image_decode(encoded_image)
True

# Encode using a base image, forcing RGB
>>> image = image_from_url(url)
>>> encoded_image = PyHide(data).image_encode(mode='RGB', base=image)
>>> data == PyHide.image_decode(encoded_image)
True

The returned images are instances of PIL.Image, which contains the save functionality if needed. pyhide by itself does everything in memory and will not write anything to disk.

Project details


Release history Release notifications

This version

1.0.0

Download files

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

Files for pyhide, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size pyhide-1.0.0.tar.gz (6.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page