Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/huntfx/pyhide
Use steganography to hide data in images.
https://github.com/huntfx/pyhide
lsb-steganography python steganography
Last synced: about 2 months ago
JSON representation
Use steganography to hide data in images.
- Host: GitHub
- URL: https://github.com/huntfx/pyhide
- Owner: huntfx
- License: mit
- Created: 2015-01-15T22:11:48.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-02-09T14:54:45.000Z (almost 5 years ago)
- Last Synced: 2024-11-10T09:41:19.085Z (3 months ago)
- Topics: lsb-steganography, python, steganography
- Language: Python
- Homepage:
- Size: 5.51 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```python
# 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.