Skip to main content

Cut images into tiles and reassemble them..

Project description

[image]

[![image][1]]

[![image][2]]

[documentation] | [website]

Image Slicer

What does it do?

Splits an image into n equally-sized tiles. Also capable of joining the pieces back together.

Whether you are planning a collaborative art project, creating a jigsaw puzzle, or simply get a kick out of dividing images into identical quadrilaterals... this package is for you!

Installation

$ pip install image_slicer

Python versions supported:

  • 2.7+
  • 3.4+

Usage

Slice an image with Python:

>>> import image_slicer
>>> image_slicer.slice('cake.jpg', 4)
(<Tile #1 - cake_01_01.png>, <Tile #2 - cake_01_02.png>, <Tile #3 - cake_02_01.png>, <Tile #4 - cake_02_02.png>)

... or from the command line:

$ slice-image cake.jpg 36

[Further examples] can be found in the [documentation].

About

This module was developed for collabart, a web application for launching collaborative art projects.

[image]: http://badge.fury.io/py/image_slicer [1]: https://travis-ci.org/samdobson/image_slicer.svg?branch=master [![image][1]]: http://travis-ci.org/samdobson/image_slicer?branch=master [2]: https://coveralls.io/repos/github/samdobson/image_slicer/badge.svg?branch=master [![image][2]]: https://coveralls.io/github/samdobson/image_slicer?branch=master [documentation]: https://image-slicer.readthedocs.org/en/latest/ [website]: http://samdobson.github.io/image_slicer [Further examples]: https://image-slicer.readthedocs.org/en/latest/examples/

0.3.0 (17/08/2019)

  • Fix join functionality (author: @chughts)

0.2.0 (22/10/2018)

  • Fix save is executed twice
  • Fix file extensions of output files should be lower case
  • Fix CLI script help text for JPEG usage

0.1.1 (15/08/2013)

  • Fix slice-image script.
  • Rename join_tiles() to join().

0.1.0 (12/08/2013)

  • New Tile class.
  • split_image() now saves tiles by default.
  • get_basename() can now handle paths.
  • More comprehensive validation in validate_image().
  • Fix incorrect filenames returned by save_tiles().
  • Expand documentation.
  • Improve test coverage.

0.0.2 (07/23/2013)

  • Fix dependencies in setup.py

0.0.1 (07/19/2013)

  • Initial release.

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_slicer-0.3.0.tar.gz (90.9 kB view details)

Uploaded Source

Built Distribution

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

image_slicer-0.3.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file image_slicer-0.3.0.tar.gz.

File metadata

  • Download URL: image_slicer-0.3.0.tar.gz
  • Upload date:
  • Size: 90.9 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.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for image_slicer-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4d9c75c192eb5f2fea6ef9aa45839262c3d70f3fd3cb853fade97899d0dd77bd
MD5 fadc083cb2b1cb0750d84aba7e344580
BLAKE2b-256 fe6de14c8ca35d7153c27ac929aafac3295d522d018a0df11fd508b135226bfd

See more details on using hashes here.

File details

Details for the file image_slicer-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: image_slicer-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for image_slicer-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d15a7b2c24adced7727966b7456d12a67ffce818ed7d074c0f27c14adb96e12d
MD5 f35bd138bfdde8d938cb42b3fe2f8d33
BLAKE2b-256 d61e6afd4b8c88f888fb7b909b02c102709c413d0dd1ed9047914002b87bc6b9

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