This commit is contained in:
Andreas Wilms
2025-09-08 18:30:35 +02:00
commit f12cc8b2ce
130 changed files with 16911 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import subprocess
def convert_svg_to_png(svg_path, png_path, dpi):
try:
subprocess.run(['C:\\Program Files\\Inkscape\\bin\\inkscape.exe', svg_path, '--export-filename', png_path, f'--export-dpi={dpi}'])
print(f"Conversion successful: {svg_path} -> {png_path} at {dpi} DPI")
except Exception as e:
print(f"Conversion failed: {e}")
# Specify your SVG and PNG file paths
input_svg_path = 'C:\\Users\\olgaw\\Desktop\\Andre\\SVGBilderProgramm\\Test\\SVGEXportTest\\images\\btb184.svg'
output_png_path = 'output_file33.png'
# Set the DPI
dpi = 300
# Call the conversion function
convert_svg_to_png(input_svg_path, output_png_path, dpi)