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.
- Bulk image resizing
- Support for various image formats (JPEG, PNG, etc.)
- Customizable output directory
- Preview resized images before saving
- Preserve aspect ratio option
- Python 3.7 or higher
pip
(Python package installer)
-
Clone the repository:
git clone https://github.com/gaikwadyash905/ResiCLI.git cd ResiCLI
-
Install the package:
python3 setup.py install
To resize an image, use the following command:
resicli input_image.jpg --resize 800x600 --output /path/to/output_directory
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 |
-
Resize an image to 800x600 pixels and save it to the current directory:
resicli input_image.jpg --resize 800x600
-
Resize an image to 800x600 pixels and save it to a specified directory:
resicli input_image.jpg --resize 800x600 --output /path/to/output_directory
-
Preview the resized image before saving:
resicli input_image.jpg --resize 800x600 --preview
-
Resize an image while preserving the aspect ratio:
resicli input_image.jpg --resize 800x600 --preserve-aspect
-
Resize an image by 50% and save it to the current directory:
resicli input_image.jpg --resize-by-percent 50
-
Restore the original image from backup:
resicli input_image.jpg --undo
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"
}
-
Clone the repository:
git clone https://github.com/gaikwadyash905/ResiCLI.git cd ResiCLI
-
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
-
Install the dependencies:
pip install -r requirements.txt
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Make your changes.
- Commit your changes (git commit -am 'Add new feature').
- Push to the branch (git push origin feature-branch).
- 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].