Reduce image size
Project description
Image Size Reducer
Image Size Reducer is a package created for reducing image size for fast uploading and processing.
Steps
- Specify image path
- Specify quality 1-100
- Specify path where you want to save
Installation
Image Size Reducer requires python3 to run.
pip install image-size-reducer
Usage
Image Size Reducer
from imageSizeReducer import imageSizeReducer
actualImage = "path/to/img.jpg"
pathToSave = "path/to/img.jpg"
quality=95
imageSizeReducer.resize(actualImage, quality, pathToSave)
# output - {'message': 'successfully completed image resize', 'actual-image-path': '/home/bramhesh/Downloads/20.jpg', 'quality-specified': 50, 'path-to-image': '/home/bramhesh/20.jpg'}
# output - {'message': 'image resize process failed', 'error': FileNotFoundError(2, 'No such file or directory'), 'actual-image-path': '/home/bramhesh/Downloads/2.jpg', 'quality-specified': 50, 'path-to-image': '/home/bramhesh/20.jpg'}
# output - {'message': 'image resize process failed', 'error': ValueError('unknown file extension: '), 'actual-image-path': '/home/bramhesh/Downloads/20.jpg', 'quality-specified': '/home/bramhesh/20.jpg', 'path-to-image': 50}
Project details
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 imageSizeReducer-0.1.9.tar.gz
.
File metadata
- Download URL: imageSizeReducer-0.1.9.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36db3e73bbc6e6cd0b4fa5812559fe8c36fa42f5d7e1a9f0ae178aeb82c3997d |
|
MD5 | dc919f4ff3bb60adba99948456a86c4b |
|
BLAKE2b-256 | ecb66c16087410f628211a32ca23de77485fce17fe07206f417324ae1316aa53 |
File details
Details for the file imageSizeReducer-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: imageSizeReducer-0.1.9-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d01ac9d7be9787ba098d35b4cb0282c38aecabb0d78ea57ea0ec3c13761ad4a |
|
MD5 | 9458b27c46a790e908846a0d7f7ba0af |
|
BLAKE2b-256 | c990a411271c3d5340f4dd6c94a5f2c1e1fa3093853922ebe4ff9f39d0847b84 |