Skip to main content

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 image-size-reducer import resize

actualImage = "path/to/img.jpg"
pathToSave = "path/to/img.jpg"
quality=95

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

imageSizeReducer-0.1.7.tar.gz (1.8 kB view details)

Uploaded Source

Built Distribution

imageSizeReducer-0.1.7-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file imageSizeReducer-0.1.7.tar.gz.

File metadata

  • Download URL: imageSizeReducer-0.1.7.tar.gz
  • Upload date:
  • Size: 1.8 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

Hashes for imageSizeReducer-0.1.7.tar.gz
Algorithm Hash digest
SHA256 21a46bb01e5a432c77efeaaa284afc90d311b8818e36ba41241b6d571040ef73
MD5 9a864e30f52ed767babc748977482cd8
BLAKE2b-256 2dfbd2dd1fb6b51965829c645bb90d3ffb7ee8b131a465336dca3a29c410545d

See more details on using hashes here.

File details

Details for the file imageSizeReducer-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: imageSizeReducer-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 2.5 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

Hashes for imageSizeReducer-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 08c12945e4b9c30e8e1fac76277d0665a84da304fc04fc3dfccb5739b9fb951b
MD5 f2db76bed00eefe4d9f057f1694bd572
BLAKE2b-256 e426ba6cf2659143b731f36f81f254461274f7dfbf26f377d12f0a9fc4269bed

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page