Skip to main content

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

  1. WebP. Unfortunatelly WebP is not well supperted in Safari yet.
  2. https://github.com/tannerhodges/gulp-zorrosvg
  3. https://github.com/gribnoysup/jpng.svg

Why

  1. It is dead simple in Python
  2. 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)

Source distribution for transpeg 1.2.0
File Size Uploaded
transpeg-1.2.0.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for transpeg 1.2.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page