Skip to main content

Converts the pixels of a raster image to SVG for pixel-perfectness. Best for 8-bit or lower images.

Project description

This is a Python port of Pixels to SVG, which is itself inspired by px2svg. I did the Python port since Python-based scripting fits better with my workflow than JS-based scripting.

Essentially, each pixel of the original image is put into an SVG rectangle so a lowres image can be scaled without blurriness! Here's quote from Pixels to SVG: The image data is extracted from a canvas, and separated by color. The coordinates for each color are combined into single runs where possible to keep the path data syntax short, then merged into one path with a stroke of the color.

Just like Pixels to SVG, this works best with 8-bit images, or graphics where colors are limited and the dimensions are relatively small.

If you like my projects, please consider supporting me!

Buy Me A Coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypix2svg-0.1.0.tar.gz (42.3 kB view hashes)

Uploaded Source

Built Distribution

pypix2svg-0.1.0-py3-none-any.whl (26.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page