Giter Club home page Giter Club logo

image-resizer's Introduction

Image Resizer

A simple python tool to resize multiple (or single) images.

Setup

To run this resizer you should create a virtual environment (or install depedencies system wide). If your default interpreter is python 3:

$ python -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

If your default interpreter is python 2 and you have python 3 installed:

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

If you are using Windows:

$ python -m venv venv
$ venv\Scripts\activate.bat
$ pip install -r requirements.txt

Using resizer

The resizer has multiple options to work with. You can check all of your options using:

$ python resizer.py --help
usage: conv.py [-h] [--single SINGLE] [--filter FILTER] [--content CONTENT]
               [--out OUT] [--h H] [--w W] [--ext EXT]

optional arguments:
  -h, --help         show this help message and exit
  --single SINGLE    Only converts a simple image file
  --filter FILTER    1- NEAREST 2-BILINEAR 3-BICUBIC 4-ANTIALIAS
  --content CONTENT  File or directory to convert
  --out OUT          Output directory
  --h H              HEIGHT
  --w W              WIDTH
  --ext EXT          Output extension file

Take in consideration:

  • --single is, by default, 0, if your want use to multiple files user --single 1 --content your_path;
  • --filter is, by default, 1, you don't need to write the filter name, just the number;
  • --h is, by default, 500px;
  • --w is, by default, 500px.
  • --ext is, by default, .png
  • --content if you want use an entire directory make sure that you are using --single 1

image-resizer's People

Contributors

user-cube avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.