Files
alan d300fdc5a5 New app icon: a pipeline graph instead of the P
One stage forks into two parallel stages that rejoin in a finished ring, in
the app's palette on the dark background. Updates the Android adaptive,
themed and legacy launcher icons, the status-bar icon, the iOS icon set and
the web favicon and PWA icons, and adds the generator under tool/app_icon.
2026-11-01 18:02:34 +00:00

8 lines
712 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# render.sh <svg> <size> <out.png> [bg] — renders an SVG at size×size with headless Chrome (transparent by default).
svg=$1; size=$2; out=$3; bg=${4:-transparent}
html=$(mktemp "${TMPDIR:-/tmp}/icon-render.XXXXXX.html")
printf '<html><body style="margin:0;background:%s"><img src="file://%s" style="width:%spx;height:%spx;display:block"></body></html>' "$bg" "$svg" "$size" "$size" > "$html"
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --headless=new --disable-gpu --hide-scrollbars --default-background-color=00000000 --force-device-scale-factor=1 --allow-file-access-from-files --window-size=$size,$((size+0)) --screenshot="$out" "file://$html" >/dev/null 2>&1
rm -f "$html"