Wanna transparent JPEG? Unfortunately there is no such thing except mostly unsupported JPEG 2000. But you can convert your transparent image into SVG containing a color information as JPEG and an alpha channel as a greyscale mask. This simple tool does exactly this. The logo above is an example.
Usage
transpeg input.png output.svg
Installation
pip install transpeg
Alternatives
- WebP. Unfortunatelly WebP is not well supperted in Safari yet.
- https://github.com/tannerhodges/gulp-zorrosvg
- https://github.com/gribnoysup/jpng.svg
Why
- It is dead simple in Python
- I needed a PNG palette for a mask
Release files for transpeg 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| transpeg-1.2.0.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| transpeg-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / transpeg-1.2.0.tar.gz
| Download URL | transpeg-1.2.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af7f01b6427e43a6c15aa1f958de7c72b5f26b6aaf1b472c2cbb074f441b3f94
|
|
BLAKE2b-256 checksum How to use checksums |
f0ad9a2dae3ede2d2979eb1e60a1a6e651c7877b872460ba4ced6b1577ac6857
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|
Release files / transpeg-1.2.0-py3-none-any.whl
| Download URL | transpeg-1.2.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40ad28ddb58d6b1b6c86de687449f1b2f60ef2c2a026982744a7c84ae149ea2a
|
|
BLAKE2b-256 checksum How to use checksums |
7c2b772904b709dda5e9d91b961d20ff0b7f20ae2a9416509e95df20f81abce3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|