artdirector
Set a focal point and "artdirector" crop your image to different resolutions without missing the subject. Ideal to create images for mixed or responsive media.
Example
Original Image (by me)
Variants
artdirector --focus-x 260 --focus-y 440 --height 600 --width 600 --zoom 0.0 --edge 3.0 example.jpeg test-1.jpeg
artdirector --focus-x 260 --focus-y 440 --height 600 --width 300 --zoom 0.2 --edge 3.0 example.jpeg test-2.jpeg
artdirector --focus-x 260 --focus-y 440 --height 600 --width 600 --zoom 0.7 --edge 3.0 example.jpeg test-3.jpeg
Installation
pip3 install artdirector
Usage
Use it as a command-line tool:
$ artdirector --help
usage: artdirector [-h] [--width WIDTH] [--height HEIGHT] [--focus-x FOCUS_X] [--focus-y FOCUS_Y] [--zoom ZOOM]
INPUT_FILE OUTPUT_FILE
positional arguments:
INPUT_FILE Input image
OUTPUT_FILE Output image
options:
-h, --help show this help message and exit
--width WIDTH Crop width
--height HEIGHT Crop height
--focus-x FOCUS_X Focal point
--focus-y FOCUS_Y Focal point
--zoom ZOOM Zoom between 0.0 - 1.0 (0.0. Default)
--edge EDGE Edge (size/n) around the focal target area
As a Python module
from artdirector import ArtDirector
ad = ArtDirector()
ad.load('input.jpg')
ad.crop([400, 400], focus=[600, 300], zoom=0.3)
ad.save('output.jpg')
ad.filter_blur().filter_bw()
ad.save('output-blur-bw.jpg')
print(ad.image) # PIL Image
Metadata
Release files for artdirector 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| artdirector-0.0.3.tar.gz | 3.9 kB | Without provenance | Details for artdirector-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| artdirector-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for artdirector-0.0.3-py3-none-any.whl |
Total release size: 8.3 kB
Release files / artdirector-0.0.3.tar.gz
| Download URL | artdirector-0.0.3.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f100d2ac7fb1d6a9b4c630a67dcb6fd3dfb396271a7fb1b1aa6cb85f4c60a46c
|
|
BLAKE2b-256 checksum How to use checksums |
2d87eb75741512649d39797c4a3177694267f9e26eadf59ca109c0ba82a17f84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / artdirector-0.0.3-py3-none-any.whl
| Download URL | artdirector-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f9ef3056819a617115279138f647de4d93181f0db130a004683539ea49ba3527
|
|
BLAKE2b-256 checksum How to use checksums |
a21e19aada80a7a65f39347798b9f78d609cf615c74df0d7a29b0bff4b0023af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for artdirector 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.