This package provides a high level abstraction for some image utilities. Check out the Usage section for commands details.
This package can be installed using pip
:
$> pip install imagepills
or
$> python -m pip install imagepills
Use the command pills_size
as follows:
$> pills_size [-h] [-v] [-d STRING] [-f STRING]
Those are the options to pass to the command:
-h, --help Show the help message and exit
-v, --verbose Set verbose option
-d STRING, --directory STRING, Path to directory containing images
-f STRING, --file STRING, Image file path
We can use the pill to calculate the size of one file or a group of files inside a folder.
Use the command pills_resize
as follows:
$> pills_resize [-h] [-v] -o STRING -f STRING -w STRING -e STRING
Those are the options to pass to the command:
-h, --help Show the help message and exit
-v, --verbose Set verbose option
-o STRING, --output STRING, Path to output folder
-f STRING, --file STRING, Image file to convert
-w STRING, --width STRING, New width
-e STRING, --height STRING, New height
For project purpouses, minimum height and width under 256 pixels are not allowed, and an argparse.ArgumentTypeError
exception will be raised in such case.
If new sizes are not proportional to the original ones, the tool will resize to the biggest size (weight or height) and calculate the other one proportionally.
Use the command pills_image2png
as follows:
$> pills_image2png [-h] [-v] [-d STRING] -o STRING [-f STRING]
Those are the options to pass to the command:
-h, --help Show the help message and exit
-v, --verbose Set verbose option
-d STRING, --directory STRING, Path to directory containing images
-o STRING, --output STRING, Path to ouput folder
-f STRING, --file STRING, Image file to convert
We can use the pill to convert one or a group of files inside a folder. The ouput folder is mandatory to store converted images.
Say hello!