This project provides scripts to convert SVG files to PNG and subsequently convert the generated PNG files to JPG.
Make sure you have Python installed on your system.
- Install the required Python packages:
pip install cairosvg
- Run the
to-png.py
script:
python to-png.py
This script converts a range of SVG files (child_5.svg to child_30.svg) to PNG format using the CairoSVG library.
- ImageMagick should be installed on your system. I use choco command:
choco install imagemagick.app
-
Open a PowerShell terminal.
-
Run the
png-jpg.ps1
script:
./png-jpg.ps1
This script performs two conversions:
- Converts all .png files in the current directory to .jpg using the Windows built-in 'convert' (Magick) command.
- Converts all .png files to .jpg using the ImageMagick command-line tool.
Ensure that the ImageMagick installation path is correctly set in the script.