diff options
author | Keith Packard <keithp@keithp.com> | 2014-06-14 18:34:09 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-06-14 18:34:09 -0700 |
commit | 23708b4760250f55e8e3b1a0141df9a9ee17a936 (patch) | |
tree | 3bb8c2fdead14df1426bcf10c251074fd1eb1995 /icon | |
parent | 4e3318645d08dda483aced97450b344629902c4d (diff) |
icon: Make the icon shadows a bit less harsh
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'icon')
-rw-r--r-- | icon/Makefile.am | 6 | ||||
-rwxr-xr-x | icon/make-png | 15 |
2 files changed, 13 insertions, 8 deletions
diff --git a/icon/Makefile.am b/icon/Makefile.am index 05a4956a..92b5a6e8 100644 --- a/icon/Makefile.am +++ b/icon/Makefile.am @@ -38,17 +38,17 @@ clean-local: $(AM_FILES): altusmetrum.build -altusmetrum.build: altusmetrum.svg +altusmetrum.build: altusmetrum.svg make-png for i in $(RES); do ./make-png altusmetrum.svg $$i altus-metrum-$$i.png; done && touch $@ $(TG_FILES): telegps.build -telegps.build: telegps.svg +telegps.build: telegps.svg make-png for i in $(RES); do ./make-png telegps.svg $$i telegps-$$i.png; done && touch $@ $(MP_FILES): micropeak.build -micropeak.build: micropeak.svg +micropeak.build: micropeak.svg make-png for i in $(RES); do ./make-png micropeak.svg $$i micropeak-$$i.png; done && touch $@ #clean-local: diff --git a/icon/make-png b/icon/make-png index bc865d9f..d9dde54e 100755 --- a/icon/make-png +++ b/icon/make-png @@ -14,11 +14,17 @@ SIZE=$2 PNG=$3 SHADOW=$(($SIZE / 16)) -IMAGE=$(($SIZE - $SHADOW)) -OPACITY=80 -BLUR=$(($SHADOW / 4)) -SHIFT=$(($SHADOW - $BLUR)) +OPACITY=60 +BLUR=$(($SHADOW / 2)) + +if [ $BLUR = 0 ]; then + BLUR=1 +fi + +SHIFT=$(($SHADOW * 3 / 4)) + +IMAGE=$(($SIZE - $SHIFT - $BLUR)) TMP=image-$$.png @@ -29,4 +35,3 @@ rsvg-convert -w $IMAGE -h $IMAGE -o $TMP $SVG convert $TMP \ \( +clone -background black -shadow ${OPACITY}x${BLUR}+${SHIFT}+${SHIFT} \) \ +swap -background none -layers merge -crop ${SIZE}x${SIZE}+0+0 +repage $PNG - |