Skip to main content

Protect unintended copy of your images by hiding the key in plain sight

Project description

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](tests/data/baboon.png| width=100) ![baboon_scrambled](tests/artifacts/baboon_scrambled.png| width=100)

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

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

getscrambled-1.0.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

getscrambled-1.0.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file getscrambled-1.0.0.tar.gz.

File metadata

  • Download URL: getscrambled-1.0.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.1.0-23-amd64

File hashes

Hashes for getscrambled-1.0.0.tar.gz
Algorithm Hash digest
SHA256 61af6249df64736944b7e152f0af80182fd4adef6098d6fcb3c6738170fc7f4f
MD5 bce3b729920f2563146a1061072a92ad
BLAKE2b-256 af2eeb31d7b17b120e74e7540173371c4fdc97f54f5e25a421cd871214f30d9d

See more details on using hashes here.

File details

Details for the file getscrambled-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: getscrambled-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.2 Linux/6.1.0-23-amd64

File hashes

Hashes for getscrambled-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3d784e3ab8ae8a63b8861fe30de0985e7d4b1988b6ce9df12b63e3a4f5648b0
MD5 c12c90bed843023ff9994950149c9107
BLAKE2b-256 712238df6b954fe6fbe6147c289b5074bb125d409ca7b220a3fe9ee759ba592f

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