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 imageSizeReducer

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

imageSizeReducer-0.2.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

imageSizeReducer-0.2.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: imageSizeReducer-0.2.0.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

Hashes for imageSizeReducer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2c71133abe7d7ed7d4b9ccfa23593e0fd2eafe0e6d383902f9e07b26e37e55a1
MD5 f8ca92377e82256936c95b9401847e59
BLAKE2b-256 02dc2eea8ed77e681a3377b4f97af551d65345de12a91d1f00495e733307f9a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: imageSizeReducer-0.2.0-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

Hashes for imageSizeReducer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a11c1ea22c90914c5f7b0f06497abab60a45051a1cfd225362962610d69d125
MD5 03df3da38576cf8ca4563cf8279b19be
BLAKE2b-256 ce2f9907b85b8d9c7f8a260aa3c60abdeb716d1b207ffc894fd7611b49474847

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