Skip to content

foxypiratecove37350/svg2png

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svg2png

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.

Installation

To install svg2png, you can use pip, the Python package installer. Run the following command:

pip install svg2png

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/file.svg')

Requirements

  • Inkscape: Ensure that Inkscape is installed and added to your system PATH.

About

Convert a SVG file into a PNG file using Inkscape

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages