Skip to content

sfneal/PillowImage

Repository files navigation

PillowImage

Build Status PyPi version PyPi Python support PyPi downloads per month PyPi license StyleCI Scrutinizer Code Quality

Pillow wrapper for quick image alterations.

Package features:

  • Resize, rotate, stretch & scale images
  • Draw text
  • Insert images
  • Centering & scaled image/text placement

Propose

PillowImage is a Pillow wrapper that provides a simple interface for basic image manipulation in Python scripts & applications.

Usage

Add text or images to a blank canvas or existing images

Adding a centered Watermark

with PillowImage(img=image_path) as pi:
    pi.draw_img(watermark path, opacity=0.08, rotate=30, x='center', y='center')
    image = pi(destination=output_directory, file_name='output')

Adding text to an image

with PillowImage(img=image_path) as pi:
	pi.draw_text('Here is the first text', y=10, opacity=50)
	pi.draw_text('Here is the second text', y=50, opacity=50)
   image = pi(destination=output_directory, file_name='output')

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

In order to utilize this PillowImage you will need to have a Python (3.6+) interpreter installed on your machine.

PyPi installation

pip install PillowImage

PyPi update

pip install --upgrade --no-cache-dir PillowImage

Project Structure

├── PillowImage
│   ├── __init__.py
│   ├── _version.py
│   ├── font
│   │   ├── __init__.py
│   │   ├── Vera.ttf
│   │   └── register.py
│   ├── pillow.py
│   └── utils.py

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the Apache License - see the LICENSE.md file for details