Skip to content

An image obfuscation tool that splits an image into tiles and scrambles or unscrambles them with seed.

License

Notifications You must be signed in to change notification settings

catsital/pycasso

Repository files navigation

Pycasso

Downloads Latest PyPI release Latest Github release License Build Deploy

Split image into tiles and scramble/unscramble them based on a seed. The demo application can be found at https://image-scramble.herokuapp.com.


Scramble

Using scramble mode on this sample image will produce the following output:

example_scramble

Unscramble

To revert the image to its original state, use the same seed and slice_size on unscramble mode.

example_unscramble

Credits

Setup

Install from PyPI

$ pip install image-scramble

Install from source

  • First, you should get a copy of this project in your local machine by either downloading the zip file or cloning the repository. git clone https://github.com/catsital/pycasso.git
  • cd into pycasso directory.
  • Run python setup.py install to install package.

Usage

Web application

  • Run python app/app.py

Docker

  • Build from local using:
$ docker build -t "image-scramble" .
$ docker --name pycasso -p 5000:5000 -d image-scramble
  • Get image from Docker Hub:
$ docker pull catsital/image-scramble

Command-line utility

$ pycasso image_input.png image_output scramble

This will produce a scrambled image with seed based on your current system time. Hence, the output will be completely unpredictable and irreversible. Use the options -n for slice_size, -f for format, and -s for seed, like so:

$ pycasso image_input.png image_output scramble -n 50 50 -s seed -f jpeg

Script

Initialize a Canvas and use scramble on export by:

from pycasso import Canvas
Canvas('image_input.png', (30, 30), 'seed').export('scramble', 'image_output', 'jpeg')

About

An image obfuscation tool that splits an image into tiles and scrambles or unscrambles them with seed.

Resources

License

Stars

Watchers

Forks

Packages

No packages published