Skip to main content

Tool suite that augments existing Python Imaging Library

Project description

PILTools

Python Imaging Library Tools

Pillow is "the friendly PIL fork by Alex Clark and Contributors".

This tool suite is meant to augment the existing Python Imaging Library with the following tools:

  • Recrop: A dynamic image resizer. Given a target (width, height) dimension, resize the image, then crop with respect to a focus area.
  • (More tools to come)

Install

pip install piltools

Example A(spect) R(atio) Resize

from PIL import Image
from piltools.transform import ar_resize

im = Image.open("./cosmos.jpg")

# Double image in size
ar_resize(im, 2).show()

Example ReCrop

from PIL import Image
from piltools.transform import recrop

im = Image.open("./cosmos.jpg")

# Create an ad Banner using top center portion of image
recrop(im, (468, 60), v_align="top", h_align="center").show()

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

piltools-0.0.4.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

piltools-0.0.4-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file piltools-0.0.4.tar.gz.

File metadata

  • Download URL: piltools-0.0.4.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.2

File hashes

Hashes for piltools-0.0.4.tar.gz
Algorithm Hash digest
SHA256 1ad62d4adf74d8d7364adb761e118d92e745c34ae62469480f9abad86e5dab0e
MD5 8b52844aad73ac68dd9857c649e3a2e3
BLAKE2b-256 5b668ab01f34d771dc81bf628cdb487993eca2c367e49efceeb60f8cdeb5a3a7

See more details on using hashes here.

File details

Details for the file piltools-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: piltools-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.2

File hashes

Hashes for piltools-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3ca91d800ff9056e22bbf14e841b473fe867fb73a98fcc267755cf589a3f8b9e
MD5 f89fa77e1a51705f273534b7cd8cc20f
BLAKE2b-256 8b1113d6a93ca904d0427f02b7585a1195c0cac9594c1ec23206f6f6684ba2ff

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