Giter Site home page Giter Site logo

resizer's Introduction

Resizer

Resizer is a python shell script to quickly resize or reduce the size of images โค๏ธ

Basic Usage

Single Image resize:

resizer.py --input-file <FILENAME.png> --output <OUTPUT-DIRECTORY> --resize <RESOLUTION>

Resize all Images in a folder

resizer.py --input-folder <PATH_TO_INPUT_FOLDER> --output-folder <PATH_TO_OUTPUT_FOLDER> --resize <RESOLUTION>

Note: The resolution should given in this way: WIDTHxHEIGHT Example:

resizer.py --input-file <FILENAME.png> --output <OUTPUT-DIRECTORY> --resize 1024x768
resizer.py --input-file <FILENAME.png> --output <OUTPUT-DIRECTORY> --resize 256x256

Single Image reduce size:

resizer.py --input-file <FILENAME.png> --output <OUTPUT-DIRECTORY> --reduce

Reduce the size of all Images in a folder

resizer.py --input-folder <PATH_TO_INPUT_FOLDER> --output-folder <PATH_TO_OUTPUT_FOLDER> --reduce

Note: The size reduction works on the quality and optimize parameters of PIL. The default quality reduction is set at 85% and can be changed to your liking, But I'll recommend the default as it does not make much difference to the image and the size difference will be around 30% to 40% in size

Installation

  1. Clone this repository:

    $ git clone [email protected]:ionicc/Resizer.git
    $ cd Resizer
  2. Install from requirements.txt

    pip install requirements.txt
    
  3. Set the folder to Environment PATH variable

    So, Accessing resizer.py will be easier

  4. Run the script and enjoy ๐Ÿ˜„

resizer's People

Contributors

aniket-mishra avatar ionicc avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

aniket-mishra

resizer's Issues

Feature addition

Features to be added:
1 - Custom Resolutions
2 - User-defined image size
3 - Image type converter (png->jpeg and so on)

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.