Updated generatePngIcons

The script is now compatible with Inkscape 1.0
This commit is contained in:
Morgan Hardwood 2021-06-04 01:36:06 +02:00
parent 73c505cf44
commit 3f58095b60

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# By Maciej Dworak # By Maciej Dworak
# Version 2018-07-21 # Version 2021-06-04
# Compatible with Inkscape 1.0
# This script generates PNG icons from SVG files using Inkscape. # This script generates PNG icons from SVG files using Inkscape.
# If pngquant is installed, it will automatically use it to compress the PNGs. # If pngquant is installed, it will automatically use it to compress the PNGs.
# #
@ -96,17 +97,17 @@ printf '%s\n' "Output folder: ${outDir}" ""
convertSvg() { convertSvg() {
if [[ ${OSTYPE^^} = "MSYS" ]]; then if [[ ${OSTYPE^^} = "MSYS" ]]; then
"/c/Program Files/Inkscape/inkscape.exe" \ "/c/Program Files/Inkscape/inkscape.exe" \
--without-gui \
--export-area-page \ --export-area-page \
--export-background-opacity="0" \ --export-background-opacity="0" \
--export-png="$1" \ --export-type=png \
--export-filename="$1" \
"$2" "$2"
else else
inkscape \ inkscape \
--without-gui \
--export-area-page \ --export-area-page \
--export-background-opacity="0" \ --export-background-opacity="0" \
--export-png="$1" \ --export-type=png \
--export-filename="$1" \
"$2" "$2"
fi fi