https://github.com/anmnv/python-image-compressor
python image compressor
https://github.com/anmnv/python-image-compressor
compressor image python
Last synced: about 1 month ago
JSON representation
python image compressor
- Host: GitHub
- URL: https://github.com/anmnv/python-image-compressor
- Owner: AnMnv
- License: mit
- Created: 2024-09-10T19:53:27.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-12-21T21:13:42.000Z (5 months ago)
- Last Synced: 2025-03-27T08:22:04.998Z (about 2 months ago)
- Topics: compressor, image, python
- Language: Python
- Homepage:
- Size: 1.64 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Very simple, yet powerful script for local compression of multiple images.
Requirements:
```pip install Pillow tqdm```> [!IMPORTANT]
> compressor_v2_async -- a version of the code that has all previous features + asynchronously processing with the asyncio library + progress bar :)> [!IMPORTANT]
> compressor_v1 -- a version of the code that recursively goes through all folders in the current directory, compresses images and overwrites them.> [!IMPORTANT]
> compressor -- current version of the code iterates through all image files in a given directory, compresses them to a target size, and saves them in an output folder. It reduces image dimensions if needed and adjusts the quality to achieve compression while maintaining a minimum threshold for quality.Just place all files (.png, .jpg, .jpeg) that you want to compress nearby the ```compressor.py``` and run it.
| 1.66 Mb | 156 Kb |
|---|---|
|  | |