Skip to main content

A library to tile photos at different resolution levels, for loading performance

Project description

Tilesman is designed to create a hierarchy of tiled representations of the supplied photo. Starting with the photo in its original pixel resolution, Tilesman will create the minimum number of tiles, as per dimensions supplied as arguments, and save them in a numbered folder. After that, the photo will be resized to 1/2 of its original size and the tiling process will be applied recurvively until the photo reaches the minimum size of 1 x 1 pixels. At this moment, a hierarchy of folders is expected to exist, named from “0” (1 x 1 pixels image, one tile) up to the highest numbered folder (original size photo, maximum number of tiles). Tiles can have dimensions smaller than the requested sizes, when they are extracted from the edges of x and y axes.

Pre-requisites

Python 3.0+

pip 9.0.0+

Pillow 5.0.0+

Installation

pip install tilesman

Usage (in your code)

from tilesman.core import run

run(‘/path/to/the/photo’, tile_max_width, tile_max_height)

Usage (command line)

For detailed argument options:

tilesman -h

To tile a photo

tilesman -p /path/to/the/photo -w <tile_max_width> -e <tile_max_height>

Tests

After downloading the source code from “https://github.com/furzedo/Tilesman”:

cd /where/you/saved/tilesman/source

python -m unittest -v tilesman/tests/test_*

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

tilesman-0.1.6.tar.gz (18.8 kB view details)

Uploaded Source

File details

Details for the file tilesman-0.1.6.tar.gz.

File metadata

  • Download URL: tilesman-0.1.6.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tilesman-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5e1952a0b27c1be9250254eacf781b06164c2a8407b772935ac10bcb9e9cc8ac
MD5 4ee7c2a92b7e04a00be6444b912bffbe
BLAKE2b-256 97d8420940894a9a7fd1613ff489683d16a8fa3a77b750e98b9d48092396fa75

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