Skip to main content

Organisation Logo

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
The Lupaxa Project Footer

Metadata

Release files for lupaxa-image-converter 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lupaxa-image-converter 0.1.1
File Size Uploaded
lupaxa_image_converter-0.1.1.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lupaxa-image-converter 0.1.1
File Interpreter ABI Platform
lupaxa_image_converter-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.2 kB

Release files / lupaxa_image_converter-0.1.1.tar.gz

Download URL lupaxa_image_converter-0.1.1.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a32fd39beee4a0eb32c51084163bb9745c90d954ed8ab9142b70991d875f8b9d
BLAKE2b-256 checksum
How to use checksums
04363de99be779cf2d22d8d2942117ea6a4c14e72c924fda1dd1524069bfc7ba
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 7, 2026.

Transparency log

Release files / lupaxa_image_converter-0.1.1-py3-none-any.whl

Download URL lupaxa_image_converter-0.1.1-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
412abfde6c49c643afed5e8387c34c603a913de2068caca8436ebf7b06d8d0ee
BLAKE2b-256 checksum
How to use checksums
df54e58869eaa38c6cc708ff06ce1a6abbabb8bcfcd63c00fb2657c647e1965e
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 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

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