03
Projects · active
imgbytesizer
Smart image resizer that achieves exact target file sizes with optimized quality and format conversion.
- Created
- Stack
- PythonPillowCLI
- Site
- pypi.org/project/imgbytesizer
- Source
- pyyupsk/imgbytesizer
A CLI tool that resizes images to hit an exact file size target. Binary-search quality and dimensions to find the optimal output.
Features
- Exact file size — specify target size in bytes, KB, or MB
- Format conversion — output as JPEG, PNG, WebP with optimal settings
- Quality optimization — binary-searches quality parameter for best visual result
- Batch processing — resize multiple files at once
- Progressive encoding — uses progressive JPEG for smaller file sizes
Usage
pip install imgbytesizer
imgbytesizer photo.jpg --size 500KB --output optimized.webp
imgbytesizer *.png --size 200KB --format jpeg