A package to process all the images inside a folder using the Pillow package
Project description
Batch Image Processor
This is a Python library that provides methods to resize, crop, convert, rotate, and blur images in a specified folder and its subfolders using the Pillow (PIL Fork) library.
Requirements
- Python >=3.7
typing
moduleos
modulePillow
(Pillow (PIL) Fork) >= 9.0.0
This package using Pillow library. Hence, it is required to install this package before installing batch image processing package. Please check the following documentation to install Pillow library
https://pillow.readthedocs.io/en/stable/
Installation
You can simply intall this package by using pip
pip install batch-image-processing
Usage
Import the package to your file:
from batch_image_processing import ImageProcessor
Create an object of ImageProcessor
class. When you creating the instance, you need to pass two arguments.
path/to/image_folder
path/to/output_folder
processor = ImageProcessor("images/images-to-crop", "images/processed-images")
After that, call to the functions according to your preferences
Resize Images
processor.resize_images(100, 100)
Crop Images
processor.crop_images(50, 50, 150, 150)
Convert images to another type
processor.convert_images("png")
Rotate Images
processor.rotate_images(90)
Blur Images
processor.blur_images(5)
Grayscale Images
processor.grayscale_images()
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Author
Author Akash Manujaya
License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file batch_image_processing-0.1.5.tar.gz
.
File metadata
- Download URL: batch_image_processing-0.1.5.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.9.13 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebba07073503eb9223318983bbeeed9dff63b8cfc737ba9252d17fd70cd25e31 |
|
MD5 | 76b2f6a8c93ac2ec71263e8ea6adf445 |
|
BLAKE2b-256 | b72ab206b71ea131a31157abb8bb5b324cd528878427f0474f70ecb401f0e4a0 |
File details
Details for the file batch_image_processing-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: batch_image_processing-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.9.13 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffa2c3c19ce373092a995e15d8d35d87141e24d91ea078fcb877db60b92eaf61 |
|
MD5 | 36b5cf6a12540053889112012761e3ac |
|
BLAKE2b-256 | d93010753b319e4f0093c9b9336d82e2614bceb681769c61d21becdf16df0be0 |