Skip to main content

imagepills is a package that provides high level abstraction for some image utilities

Project description


IMAGEPILLS

Description

This package provides a high level abstraction for some image utilities. Check out the Usage section for commands details.

Installation

This package can be installed using pip:

$> pip install imagepills

or

$> python -m pip install imagepills

Usage

Size

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.

Resize

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.

Convert to png format

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.

Contributors



Say hello!

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

imagepills-0.0.6.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distribution

imagepills-0.0.6-py3-none-any.whl (8.5 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