pillowcover
Mass Manipulate Images Using Python: Change Brightness, Contrast, Sharpness, Resize, Compress, Crop and Convert (e.g png to jpg). A simple script (wrapper) using pillow. Licensed Under: GNU General Public License v3 or later (GPLv3+)
Requirements
python >= 3.5, pillow
Installation
Simplest option is to install with pip using sudo.
sudo python3 -m pip install pillowcover --upgrade
--OR-- Install as a user without sudo. This installs it in ~/.local/bin/ make sure this path is in your $PATH.
python3 -m pip install --user pillowcover --upgrade
If not found, add the following to your .bashrc or .zshrc
# Add to PATH to Install and run programs with "pip install --user"
export PATH=$PATH:~/.local/bin
Usage
To increase brightness, contrast, sharpness by 20% and resize all images (landscape, portrait) to max dimension of 1920 pixels (using largest dimension. hight or width) and compress them to 60% in a given folder while keeping the same aspect ratio.
pillowcover -d /home/user/Pictures/ -b 1.20 -c 1.20 -s 1.20 -r 1920 -q 60
To crop (640*480 from the left corner) and convert (from png to jpg) all images in a folder.
plc -d /home/user/Pictures/ -k "0,0,640,480" -x jpg
Usage Options
usage: pillowcover [-h] [-v] [-d DIR] [-o OUTPUT_DIR] [-b BRIGHTNESS] [-c CONTRAST]
[-s SHARPNESS] [-r RESIZE] [-R RESIZE_RATIO] [-k CROP]
[-q COMPRESSION] [-x EXTENSION]
[image_file]
PillowCover: Mass Manipulate Images Using Python: Change Brightness, Contrast,
Sharpness, Resize, Compress, Crop and Convert. A simple script (wrapper) using
pillow. Licensed Under: GNU General Public License v3 or later (GPLv3+)
positional arguments:
image_file Full path to the image file to edit
optional arguments:
-h, --help show this help message and exit
-v, --version show program\'s version number and exit
-d DIR, --dir DIR Path to the directory containing the image files
-o OUTPUT_DIR, --out-dir OUTPUT_DIR
Path to output directory to store edited images. by
default they get stored in (parent
director)/pillowcover-output
-b BRIGHTNESS, --brightness BRIGHTNESS
Change brightness level, 1.00 is the current value
-c CONTRAST, --contrast CONTRAST
Change contrast level, 1.00 is the current value
-s SHARPNESS, --sharpness SHARPNESS
Change sharpness level, 1.00 is the current value
-r RESIZE, --resize RESIZE
Resize img, keep ratio. provide the maximum
length/width value as one number. e.g pillowcase.py
img -r 1920
-R RESIZE_RATIO, --resize-ratio RESIZE_RATIO
Resize img by providing new width and length e.g
pillowcase.py img -R "640 480"
-k CROP, --crop CROP Crop img by providing starting point then width and
length from it e.g pillowcase.py img -k "0,0,640,480"
-q COMPRESSION, --compression-quality COMPRESSION
Compression quality 1-100, 100 means no compression at
all
-x EXTENSION, --extension EXTENSION
Specifiy the output extension. Can be 'jpg', 'jpeg',
'png' Default is same as the input file's. e.g
pillowcase.py -d imgdir -x "jpg"
Metadata
Release files for pillowcover-gui 1.2.0
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 | |
|---|---|---|---|---|
| pillowcover_gui-1.2.0.tar.gz | 5.3 kB | Without provenance | Details |
Release files / pillowcover_gui-1.2.0.tar.gz
| Download URL | pillowcover_gui-1.2.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8e3cc3bd9ef61bf381af7bbb9d2602a8d074fcfb891ef969f01088afcbbf50e
|
|
BLAKE2b-256 checksum How to use checksums |
82abc690151d6433de50d2b863e29f4bb6522c852219e2e75a70fde01423f2d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6
|
Security for pillowcover-gui 1.2.0
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.