Skip to content

Instantly share code, notes, and snippets.

@dardo82
Last active October 11, 2022 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dardo82/adb19f4202b1e06e435c718e7f452a3b to your computer and use it in GitHub Desktop.
Save dardo82/adb19f4202b1e06e435c718e7f452a3b to your computer and use it in GitHub Desktop.
FrontRow Kodi Icon
#!/bin/sh
BASE="FrontRow.png"; LOGO="Kodi.png"; PNG="${LOGO%.*}-$BASE"
ICNS=${PNG/.png/.icns}; SIZE=$(file "$BASE" | cut -d' ' -f5)
for n in {0..3}; do eval S$n="$[$SIZE/(2**$n)]"; done
DIM="${S2}x${S2}"; POS="+$[($S2+$S3)]+$[($S0/3)-$S3]"
convert $BASE \( $LOGO -geometry $DIM$POS \) \
-compose soft-light -composite $PNG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment