d300fdc5a5
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.
8 lines
712 B
Bash
Executable File
8 lines
712 B
Bash
Executable File
#!/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"
|