Image Converter
Convert an image from one format to another: JPG, JPEG, PNG, GIF, WebP, and SVG.
Raster formats are converted with Pillow. SVG input is rasterised with CairoSVG. A raster image converted to SVG is embedded in an SVG document.
Note: Embedding a raster image in SVG does not vectorise it.
Install
Python 3.10 or newer. The PyPI package name is lupaxa-image-converter.
The console command is image-converter.
SVG input also needs the system Cairo library (brew install cairo on macOS,
or apt install libcairo2 on Debian/Ubuntu).
python -m pip install lupaxa-image-converter
From a clone, for development:
python -m pip install -e ".[dev]"
Use
image-converter photo.png photo.webp
image-converter photo.png --format webp
image-converter logo.svg --format png
The same commands work as a module:
python -m lupaxa.image_converter photo.png --format webp
--format writes the result next to the input, using the input name and the
new suffix. Pass an output path when the file should live somewhere else.
If you pass both, the output suffix must match --format.
JPEG output flattens transparency onto white. --quality applies to JPEG
and WebP (default 90).
CLI Options
Run image-converter --help for the authoritative list from your installed
version.
| Option | Default | Description |
|---|---|---|
input |
(required) | Input image. |
output |
Output image. Optional when --format is used. |
|
-f / --format |
jpg, jpeg, png, gif, webp, or svg. |
|
-q / --quality |
90 |
JPEG and WebP quality from 1 to 100. |
Testing
make init
make python-install-dev
make python-check
Or without Make:
python -m pip install -e ".[test]"
pytest
Coverage for lupaxa.image_converter is reported by default. SVG tests run
when native Cairo is available and skip otherwise:
pytest -m cairo
Metadata
Release files for lupaxa-image-converter 0.1.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 | |
|---|---|---|---|
| lupaxa_image_converter-0.1.0.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lupaxa_image_converter-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.2 kB
Release files / lupaxa_image_converter-0.1.0.tar.gz
| Download URL | lupaxa_image_converter-0.1.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e6e083b4e5a384a58db7c43fadf6c5f98c7f3ff3ebdc6f54f775ad8c1c3448c
|
|
BLAKE2b-256 checksum How to use checksums |
d2e647c3205e000753c1f2f8f2af055bebadb4045bd4502db3641501a172f8d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / lupaxa_image_converter-0.1.0-py3-none-any.whl
| Download URL | lupaxa_image_converter-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d30038543681ba9aa12c7e89ab169fef59de5f711eecdeff0230651607528b1
|
|
BLAKE2b-256 checksum How to use checksums |
c1d90cc7c1f19aec71185b16ecc1f737faf0858610760bd36418c44db28c9976
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency log