Skip to main content

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.

Release files for pyhide 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhide 1.0.0
File Size Uploaded
pyhide-1.0.0.tar.gz 6.6 kB Details

Release files / pyhide-1.0.0.tar.gz

Download URL pyhide-1.0.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b99564c800096756a84e95058e80b940deb0ca9a06bed3fe32a36eaeee84e274
BLAKE2b-256 checksum
How to use checksums
accaecc2577cb23c875b798e1bf9994fb4e8e6934fcd7a99a848e6e3cf6e18ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page