svg-to-png.sh

Fri, 01 Jul 2022 16:46:43 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Fri, 01 Jul 2022 16:46:43 +0300
changeset 312
2637134bc37c
parent 162
3ebe1a0ca818
permissions
-rwxr-xr-x

Fix right click to delete not really working properly
Instead of removing the point that had been added, it would remove
the point that is being drawn, which would cause it to overwrite the
previous point using the new point, causing a bit of a delay

158
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
1 #!/bin/bash
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
2 mkdir --parents icons
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
3 for svgfile in $(find icons_svg -name '*.svg')
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
4 do
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
5 pngfile="icons/$(basename ${svgfile%.svg}.png)"
162
3ebe1a0ca818 only render svg to png if the png does not exist
Teemu Piippo <teemu@hecknology.net>
parents: 158
diff changeset
6 if [[ ! -f "${pngfile}" ]]
3ebe1a0ca818 only render svg to png if the png does not exist
Teemu Piippo <teemu@hecknology.net>
parents: 158
diff changeset
7 then
3ebe1a0ca818 only render svg to png if the png does not exist
Teemu Piippo <teemu@hecknology.net>
parents: 158
diff changeset
8 echo "$svgfile => $pngfile"
3ebe1a0ca818 only render svg to png if the png does not exist
Teemu Piippo <teemu@hecknology.net>
parents: 158
diff changeset
9 convert -background none "${svgfile}" "${pngfile}"
3ebe1a0ca818 only render svg to png if the png does not exist
Teemu Piippo <teemu@hecknology.net>
parents: 158
diff changeset
10 fi
158
5bd755eaa5a8 Add icons from ionicons
Teemu Piippo <teemu@hecknology.net>
parents:
diff changeset
11 done

mercurial