A tool to convert images to WebP format with both GUI and CLI interfaces
Project description
img2webp
A tool to convert images to WebP format with both GUI and CLI interfaces.
Features
- Convert multiple images to WebP format
- Support for HEIC, JPG, JPEG, and PNG formats
- Adjustable compression/quality level
- Both GUI and CLI interfaces
- Progress tracking
- Batch processing support
Installation
pip install img2webp
Usage
Graphical Interface
Run the GUI converter by executing:
img2webp
Or in Python:
from img2webp.gui import main
main()
Command Line Interface
The CLI version provides various options for converting images:
# Convert a single file
img2webp-cli input.jpg -o output_dir
# Convert multiple files
img2webp-cli input1.jpg input2.png -o output_dir
# Set quality level (1-100)
img2webp-cli input.jpg -o output_dir -q 90
# Convert all supported images in a directory
img2webp-cli directory/*.jpg -o output_dir
# Enable verbose output
img2webp-cli input.jpg -o output_dir -v
Python API
You can also use the package programmatically:
from img2webp import convert_image, process_files
# Convert a single image
convert_image("input.jpg", "output.webp", quality=80)
# Convert multiple images
successful, failed = process_files(
["input1.jpg", "input2.png"],
"output_directory",
quality=80
)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file img2webp-0.1.1.tar.gz.
File metadata
- Download URL: img2webp-0.1.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce73461c131d200257d3ca8a2306ce0d24a1b53200c2ca63a701a3a9a9644e85
|
|
| MD5 |
22e68f391f48bb20155f3fc7b378d579
|
|
| BLAKE2b-256 |
44c17db2346a32345cd19fd63ada0674eace8f0a9e2d77c364983320a7b20996
|
File details
Details for the file img2webp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: img2webp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f47ad6ed1e9383ed36d7d415a232f7a7b0b3b6fe6cfd05a6aabe960ab3ec5ec1
|
|
| MD5 |
c65580b95c5b663d39757ca5cb5056f7
|
|
| BLAKE2b-256 |
0eb22e495020ae0d7b62b30c82acea32c9fe15af7978f1acb42638455e8f3d90
|