Files
bincio-rec/scripts/generate_icons.sh
T
Davide Scaini 7db54712fa feat: app icon, name fix, and icon generation script
- scripts/generate_icons.sh: ImageMagick script — dark #09090b bg,
  white B and red R (#ef4444) at the same 480pt size, NotoSans-Bold.
  Generates icon, adaptive foreground, monochrome, and splash variants.
- app.json: name changed to 'Bincio Rec'; adaptive icon backgroundColor
  updated to #09090b; removed redundant backgroundImage
2026-06-04 00:36:06 +02:00

44 lines
1.8 KiB
Bash
Executable File
Raw 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.
#!/usr/bin/env bash
# Generates all icon assets for bincio-rec.
# Requires ImageMagick (magick / convert).
# Style mirrors bincio_autarchive: dark background, white B, accent-coloured R.
set -e
cd "$(dirname "$0")/.."
FONT="$HOME/Library/Fonts/NotoSans-Bold.ttf"
BG="#09090b"
WHITE="#ffffff"
RED="#ef4444"
# ── Main icon (1024×1024) ─────────────────────────────────────────────────────
magick -size 1024x1024 xc:"$BG" \
-font "$FONT" \
-pointsize 480 -fill "$WHITE" -gravity NorthWest -annotate +110+295 'B' \
-pointsize 480 -fill "$RED" -gravity NorthWest -annotate +560+295 'R' \
assets/icon.png
# ── Android adaptive icon — foreground (transparent bg, design fits safe zone)
# Safe zone = inner 66% of 1024 = 676 px.
magick -size 1024x1024 xc:none \
-font "$FONT" \
-pointsize 340 -fill "$WHITE" -gravity NorthWest -annotate +175+325 'B' \
-pointsize 340 -fill "$RED" -gravity NorthWest -annotate +535+325 'R' \
assets/android-icon-foreground.png
# ── Android adaptive icon — monochrome (white on transparent, for themed icons)
magick -size 1024x1024 xc:none \
-font "$FONT" \
-pointsize 340 -fill "$WHITE" -gravity NorthWest -annotate +175+325 'B' \
-pointsize 340 -fill "$WHITE" -gravity NorthWest -annotate +535+325 'R' \
assets/android-icon-monochrome.png
# ── Splash screen icon (512×512) ─────────────────────────────────────────────
magick -size 512x512 xc:"$BG" \
-font "$FONT" \
-pointsize 240 -fill "$WHITE" -gravity NorthWest -annotate +55+147 'B' \
-pointsize 240 -fill "$RED" -gravity NorthWest -annotate +280+147 'R' \
assets/splash-icon.png
echo "✓ Icon assets generated in assets/"