Convert a SVG file into a PNG file using Inkscape
Project description
svg2png is a Python package that provides a simple function to convert SVG (Scalable Vector Graphics) files into PNG (Portable Network Graphics) format. The conversion is performed using Inkscape, a powerful vector graphics editor.
Features:
- SVG to PNG Conversion: Utilizes Inkscape to handle the conversion.
- Validation: Checks if the input file is a valid SVG and if Inkscape is installed and accessible.
- Error Handling: Provides meaningful error messages if the SVG file is invalid or if Inkscape is not found.
Usage:
To convert an SVG file to PNG, simply call the svg2png
function with the path to your SVG file:
from svg2png import svg2png
svg2png('path/to/your/icon.svg')
Requirements:
- Inkscape: Ensure that Inkscape is installed and added to your system PATH.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
svg2png-1.1.tar.gz
(8.5 kB
view details)
Built Distribution
svg2png-1.1-py3-none-any.whl
(8.6 kB
view details)
File details
Details for the file svg2png-1.1.tar.gz
.
File metadata
- Download URL: svg2png-1.1.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c7ebdf947b99d59c2d356d1e18eae4718136ecc8b0e44c902e3540a680156cb |
|
MD5 | dcb92752c9dca4aa7e0872bf6a3fecc4 |
|
BLAKE2b-256 | 2b20bb61e0de9ee76d0f5abbe2d445fe85afda0a9a2849fe46349b6f94b759e7 |
File details
Details for the file svg2png-1.1-py3-none-any.whl
.
File metadata
- Download URL: svg2png-1.1-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95954c01ee64cdbee81cf6fe2ac473a02878e368e0ee195a067c8115528d66ef |
|
MD5 | 64e8b3973573ea8754af643b59816556 |
|
BLAKE2b-256 | 1d2b62856fa928220ea312a8de688d78c79d42c71d9f836f92eac82ebc04b203 |