I got the following script to export my *.svg
to .png
in various sizes.
#!/usr/bin/env bash
[[ ! -d png ]] && mkdir png/
for svg in logo.*.svg; do
echo $svg $png
sizes=( 64 128 256 512 1024 )
for size in "${sizes[@]}"; do
png="png/${svg//.svg/.$size.png}"
[[ $png =~ vertical ]] && inkscape --without-gui --export-height=$size --export-png="$png" --file="$svg"
[[ $png =~ horizontal ]] && inkscape --without-gui --export-width=$size --export-png="$png" --file="$svg"
done
done
As I want to export both monochrome (black & white) and colour version I currently have both SVG version:
- logo.bw-horizontal.svg
- logo.bw-vertical.svg
- logo.horizontal.svg
- logo.vertical.svg
Question
How can I improve my script to export in monochrome without the need to have a SVG file in monochrome?
Edit
There is a verb
, but not sure how to use it:
org.inkscape.effect.filter.Silhouette: Repaint anything visible monochrome