Skip to content

ResiCLI is a versatile command-line tool designed for efficient image resizing and management. It supports resizing images to specified dimensions or by percentage, maintaining aspect ratios, and previewing resized images before saving. The tool also includes backup and undo functionalities for seamless and non-destructive image editing.

License

Notifications You must be signed in to change notification settings

gaikwadyash905/ResiCLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected].

About

ResiCLI is a versatile command-line tool designed for efficient image resizing and management. It supports resizing images to specified dimensions or by percentage, maintaining aspect ratios, and previewing resized images before saving. The tool also includes backup and undo functionalities for seamless and non-destructive image editing.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages