Create jigsaw puzzle pieces from an image
Project description
A jigsaw puzzle pieces generator that levels the playing field.
Currently in use by Puzzle Massive to create puzzles with 5000+ pieces.
It creates jigsaw puzzle pieces in multiple formats: svg, jpg, and png. The number and size of pieces are set by passing the script different options. It takes a while to run if doing a lot of pieces. It currently uses potrace, and imagemagick convert subprocesses. Extra JSON files are created with details on size of pieces and adjacent pieces information which is commonly used when verifying that two pieces can join together.
Installing
Requires:
Python Packages:
Other Software needed:
If on ubuntu or other debian based distro:
$ apt-get install imagemagick potrace libffi-dev python-libxml2 libxml2-dev python-lxml
Install with pip in editable mode for developing and use virtualenv to isolate python dependencies:
$ virtualenv . -p python3 $ source ./bin/activate $ pip install -e .
Usage
See the script.py for more. Not everything has been implemented, but to create 100 randomly generated jigsaw puzzle pieces:
piecemaker --dir test --number-of-pieces 100 test.jpg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file piecemaker-0.3.1.tar.gz
.
File metadata
- Download URL: piecemaker-0.3.1.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a6f7a6674d6b8d35e70499fa7f6765177af19fcca3a47129e1168411d408931 |
|
MD5 | 613ff0ccdee6882253767396edf74b94 |
|
BLAKE2b-256 | 343543e17200a3cecf3e3836635a3d54f93de0593b74dab9ca1ed8067a510934 |