1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00
mpv/TOOLS/gen-x11-icon.sh
James Ross-Gowan a9833a71ce TOOLS/gen-x11-icon.sh: fix for recent ImageMagick
Apparently ImageMagick no longer appends a newline to the format. This
also sets the execute bit on the script.
2015-11-04 21:48:27 +01:00

16 lines
443 B
Bash
Executable File

#!/bin/sh
# This script is expected to be called as TOOLS/gen-x11-icon.sh (it will access
# etc/mpv-icon...), and it will write video/out/x11_icon.bin.
conv() {
echo
echo `identify -format "icon: %w %h" "$1"`
convert "$1" -depth 8 rgba:-
}
(echo "# File generated by gen-x11-icon.sh" ;
conv etc/mpv-icon-8bit-16x16.png ;
conv etc/mpv-icon-8bit-32x32.png ;
conv etc/mpv-icon-8bit-64x64.png) | gzip -c > video/out/x11_icon.bin