smilewebp
What's new 1.0.1
- fix bug
- update doc with smile-third-party
The first version 1.0.0.
Webp image library for python3.
Download
Find package
Or download any from smile-third-party
There are some versions which compacts some OS such as Mac, Ubuntu, ..etc
Find
which cwebp
$ /usr/bin/cwebp
Check version
cwebp -version
$ 0.6.1
Start to code
from smilewebp.Webp import Webp
# initialize
smile = Webp()
or
smile = Webp('/usr/bin/cwebp')
*** by default the application located in /usr/bin/cwebp
*** it's able to set to another location via
smile.setWebp(path= '/usr/bin/cwebp')
test a filename
quality value starts 20 to 100, and it's integer
smile.compress(
filename = '/home/pseth/Download/kara.png'
, quality = 80
)
verify before use
if smile.isError():
print(f'Everything is okay, the file name is: {smile.getFilename()}')
else:
print(f'{smile.getErrorMessage()}')
Options
-
dirname: can be None set coy to a new directory for the new file
-
newFilename: can be None set a new copy name
Both can set any value, or None, or one of them.
Let check the example:
Ex 1
smile.convert(
filename = '/home/pseth/Download/kara.png'
, quality = 100
# move to new directory
, dirname = '/home/pseth/Document/'
, newFilename = 'jojo'
)
Ex 2
smile.convert(
filename = '/home/pseth/Download/kara.png'
, quality = 100
# move to new directory
, dirname = '/home/pseth/Document/'
)
Ex 3
smile.convert(
filename = '/home/pseth/Download/kara.png'
, quality = 100
# move to new directory
, newFilename = 'jojo'
)
It is also available on https://pypi.org/project/smilewebp
To Support my work, please donate me via Buy me a Coffee
Metadata
Release files for smilewebp 1.0.3
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 |
|---|---|---|---|---|
| smilewebp-1.0.3.tar.gz | 4.9 kB | Without provenance | Details for smilewebp-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| smilewebp-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for smilewebp-1.0.3-py3-none-any.whl |
Total release size: 10.2 kB
Release files / smilewebp-1.0.3.tar.gz
| Download URL | smilewebp-1.0.3.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ecd1623e306146b70eb3ad41d02ac698b3ff8ac0195f95425ffba00eb5b2392
|
|
BLAKE2b-256 checksum How to use checksums |
1429be27d6240c00821aa9cd1d34546ceecce2fe178b1bfe0ea7902df38eb468
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Release files / smilewebp-1.0.3-py3-none-any.whl
| Download URL | smilewebp-1.0.3-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2fe1c0d91ff2db460ab04df0e248d46e9a0e87620225c7dab04a49073d3f0ef
|
|
BLAKE2b-256 checksum How to use checksums |
d2fd2744ab05d1157fe476d421d007fc672cf41b89fececaeb4232b34aa37877
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Security for smilewebp 1.0.3
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.