Skip to main content

Split an image into n-pieces and shuffle it.

Project description

image-shuffler

Split an image into n-pieces and shuffle it.

Comparison

Download

You can simply:

pip install image-shuffler

Or you can also:

  1. Clone the repository to your local machine.
  2. Enter the directory.
  3. Download necessary modules/libraries.
git clone https://github.com/gabrielstork/image-shuffler.git
cd image-shuffler
pip install -r requirements.txt

How to use

First you need to import the Shuffler class.

from image_shuffler import Shuffler

Then, instantiate it passing a valid path of an image as its argument.

image = Shuffler('lenna.png')

Now to actually shuffle it, you need to use shuffle() method. The matrix defines the number of pieces that will be in x and y, in this case, there will be a total of 16 shuffled pieces (you can see it in the image on the top of this file).

image.shuffle(matrix=(4, 4))

You can take a look at the image, using this method a new window will pop up.

image.show()

No arguments are needed to save the image. It will be saved in the same place and, in this case, with shuffled_lena.png as its name.

image.save()

forthebadge forthebadge

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

image-shuffler-1.0.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

image_shuffler-1.0.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file image-shuffler-1.0.2.tar.gz.

File metadata

  • Download URL: image-shuffler-1.0.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for image-shuffler-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e646d538949cb0bacb8bf58a64ccc05b0ed1bfd718fe24554d6daf02536d0333
MD5 5157c3e527b506f9cdd2449257866a95
BLAKE2b-256 9da1251ea7c3d69f3caec05dad25ef84728a5973e512e18fa9281f15a289abfa

See more details on using hashes here.

File details

Details for the file image_shuffler-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: image_shuffler-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for image_shuffler-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 22ce1b847f6b43b8a4c9e6ce98912c26616e222662c0c6d9cff5d2fa18b54a7d
MD5 483e7ef252d46c156e28dda80eed83ad
BLAKE2b-256 bb26559b19029487c1a878ab96ab10757e3ef8031e8bdcdbea47538005f75828

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page