Skip to content

Starmania/getscrambled

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GetScrambled python


Description

GetScrambled is a simple library that allows you to scramble a image. No key is needed to unscramble the image, because the key is stored in the image itself (steganography and least significant bit). The image is scrambled by shuffling blocks of pixels. The size of the blocks can be set by the user.

The library uses pillow for image manipulation.

Example

from getscrambled.encode import encode
from PIL import Image

# Encode
image = Image.open("tests/data/baboon.png")
scrambled_image = encode(image, block_size=16)
scrambled_image.save("tests/artifacts/baboon_scrambled.png")

# Decode
from getscrambled.decode import decode
decoded_image = decode(scrambled_image)
decoded_image.save("tests/artifacts/baboon_decoded.png")

Original and scrambled image

baboon baboon_scrambled

Installation

pip install getscrambled

Development and testing

git clone https://github.com/Starmania/getscrambled
cd getscrambled
poetry install
poetry run pytest

Disclaimer warning

This library is not meant to be used for security purposes nor to encrypt data. It will just make harder to see the original image. You could check that I never use the word "encrypt" in this repository.

Todo

  • More tests

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages