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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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