Skip to main content

A package to re-size images

Project description

Coverage Status

Image ReSizer

This simple package re-sizes images from a given list of urls.

Installation

pip install imgresizer

Usage

It expects you to pass ita configuration as command line parameter.
imgresizer -c <path/to/conf_json>

A sample json:

{
    "targets": [
        400,
        200,
        100
    ],
    "data": "data",
    "num_threads": 8,
    "input_dir": "incoming",
    "output_dir" : "outgoing",
    "image_urls" : "/path/to/urls.txt"
}

Firstly, it downloads them and stores them inside data/input_dir directory. Then it starts processing images to re-size and store re-sized image to data/output_dir with its new size added to its name.

Additionally, you can pass -l true so that it logs the process.

Issues

Nothing yet. But it will need to speed up.

Tasks

  • Implement thread pooling
  • Make it re-size local images

License

ImgReSizer is released under the [MIT license] (https://choosealicense.com/licenses/mit/#)

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

imgresizer-1.0.0.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

imgresizer-1.0.0-py3-none-any.whl (8.9 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