reSmush.it Image Optimizer Python package
Project Description
Python3 wrapper for resmush.it API to optimize image file size.
resmush.it Image Optimizer allows you to use free Image optimization based on reSmush.it API.
reSmush.it provides image size reduction based on several algorithms. The API accept JPG, PNG and GIF files up to 5MB.
Installation
-
Install using pip3:
$ pip3 install resmushit
Usage
import resmushit
# Save image to current directory
resmushit.from_path(image_path='image.png', quality=95)
# Save image to preferred directory
resmushit.from_path(image_path='image.png', quality=95, output_dir="output/")
# return image bytes
_bytes = resmushit.from_url(image_url="https://ps.w.org/resmushit-image-optimizer/assets/icon-128x128.png", quality=95, save=False)
Options
image_url (str): The url of image.
image_path (str): The path of image
quality (int): Quality at which image is going to be optimized.
output_dir (str): Location for output image.
preserve_exif (bool): Preserve EXIF data in the file after optimization.
preserve_filename (bool): Optimized image will prefix 'optimized-' before image name.
quiet_mode (bool): Run in quiet mode when True
save (bool): When True, saves image in directory.
When False, returns bytes of image.
Metadata
Release files for resmushit 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| resmushit-1.0.1.tar.gz | 6.7 kB | Without provenance | Details for resmushit-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| resmushit-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for resmushit-1.0.1-py3-none-any.whl |
Total release size: 13.5 kB
Release files / resmushit-1.0.1.tar.gz
| Download URL | resmushit-1.0.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c508428a5bc64305d056a0c682eb376a6821d8961d7ebdc91de25a8f59d95415
|
|
BLAKE2b-256 checksum How to use checksums |
9f9c2dc30cd32e26c03a34090238857f44fede44183c546a1f8af405b1f892f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / resmushit-1.0.1-py3-none-any.whl
| Download URL | resmushit-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0c6d2d21a934c961a1026068196cbe81a249d74261b56176b0517a880d250e52
|
|
BLAKE2b-256 checksum How to use checksums |
d79f8f74889bc66c9d498f4412fec2aeac0120fbb6d08b997aa5bee5b811c630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for resmushit 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.