Skip to main content

A CLI tool for bulk image resizing

Project description

ResiCLI

ResiCLI is a powerful command-line tool designed to quickly and efficiently resize images in bulk. It supports various image formats and provides options for resizing, previewing, and specifying output directories.

Features

  • Bulk image resizing
  • Support for various image formats (JPEG, PNG, etc.)
  • Customizable output directory
  • Preview resized images before saving
  • Preserve aspect ratio option

Installation

Prerequisites

  • Python 3.7 or higher
  • pip (Python package installer)

Install from Source

  1. Clone the repository:

    git clone https://github.com/gaikwadyash905/ResiCLI.git
    cd ResiCLI
    
  2. Install the package:

    python3 setup.py install
    

Usage

Basic Usage

To resize an image, use the following command:

resicli input_image.jpg --resize 800x600 --output /path/to/output_directory

Options

Option Description Example
--resize WIDTHxHEIGHT Resize image to specific dimensions --resize 800x600
--resize-by-percent PERCENTAGE Resize image by percentage --resize-by-percent 50
--output DIRECTORY Output directory for resized images (Default: current directory) --output ./resized
--preview Show preview before saving --preview
--preserve-aspect Maintain aspect ratio during resize --preserve-aspect
--quality QUALITY JPEG quality (1-100, Default: 85) --quality 90
--undo Restore image from backup --undo

Examples

  1. Resize an image to 800x600 pixels and save it to the current directory:

    resicli input_image.jpg --resize 800x600
    
  2. Resize an image to 800x600 pixels and save it to a specified directory:

    resicli input_image.jpg --resize 800x600 --output /path/to/output_directory
    
  3. Preview the resized image before saving:

    resicli input_image.jpg --resize 800x600 --preview
    
  4. Resize an image while preserving the aspect ratio:

    resicli input_image.jpg --resize 800x600 --preserve-aspect
    
  5. Resize an image by 50% and save it to the current directory:

    resicli input_image.jpg --resize-by-percent 50
    
  6. Restore the original image from backup:

    resicli input_image.jpg --undo
    

Configuration

The configuration file resicli_config.json allows you to set default values for various options. Here is an example configuration file:

{
  "default_output_dir": "resized_images",
  "default_resize_width": 800,
  "default_resize_height": 600,
  "preserve_aspect_ratio": true,
  "log_level": "INFO"
}

Development

Setting Up the Development Environment

  1. Clone the repository:

    git clone https://github.com/gaikwadyash905/ResiCLI.git
    cd ResiCLI
    
  2. Create a virtual environment:

    • For Windows
      python3 -m venv venv
      source venv\Scripts\activate
    
    • For Unix (Linux/MacOS)
      python3 -m venv venv
      source venv/bin/activate
    
  3. Install the dependencies:

    pip install -r requirements.txt
    

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -am 'Add new feature').
  5. Push to the branch (git push origin feature-branch).
  6. Create a new Pull Request.

For more details, see the CONTRIBUTING file.

License This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Contact For any questions or suggestions, please contact Yash Gaikwad at gaikwadyash905@gmail.com.

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

resicli-1.0.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resicli-1.0.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file resicli-1.0.0.tar.gz.

File metadata

  • Download URL: resicli-1.0.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for resicli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6212d1791432f8e6a5bd2634123a8a2161f478ac86ab3c947677312b96095b09
MD5 70023305d9ffbc3f317b3870f82cd519
BLAKE2b-256 2c9eb771f4f65fb72399d1a60c7401e770c5df6ae603dee033c1cf6f2fd839e1

See more details on using hashes here.

File details

Details for the file resicli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: resicli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for resicli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a7b8add6fe429a57245dada071f578bfc295b15bde6b619e0c86a7d225cbc28f
MD5 e905727496a06d484128583e9422857a
BLAKE2b-256 4a219effd3a3c64bf27c6841fcbf39a0408dc9fcf496ae3f9d3bb68667d2bdc5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page