From 9fa4dbd590d29f80829467e1210f2ac9ea72e19e Mon Sep 17 00:00:00 2001 From: Ian Whyman Date: Thu, 20 May 2010 19:12:35 +0100 Subject: [PATCH] [misc/scripts/mkicons.sh] Add 24px icons, provide both svg & svgz --- 5.3/misc/temp/doicon.sh | 28 ---------------------------- 5.3/misc/temp/mkicons.sh | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 28 deletions(-) delete mode 100755 5.3/misc/temp/doicon.sh create mode 100755 5.3/misc/temp/mkicons.sh diff --git a/5.3/misc/temp/doicon.sh b/5.3/misc/temp/doicon.sh deleted file mode 100755 index 75fabd1..0000000 --- a/5.3/misc/temp/doicon.sh +++ /dev/null @@ -1,28 +0,0 @@ -#! /bin/bash - -if [ -z "$1" ]; then - echo "Icon Resizer" - echo "Base SVG must be in same dir as script" - echo "usage: $0 input.svg icon-name category" - exit -fi - -mkdir oxygen-icons-sabayon -cp $1 oxygen-icons-sabayon -cd oxygen-icons-sabayon - -for i in 8x8 16x16 22x22 32x32 48x48 64x64 128x128 256x256 - do - mkdir $i - mkdir $i/$3 - convert -filter Lanczos -background \#00000000 -resize $i\! $1 $i/$3/$2.png - echo "converting ${1} to $i/$3/$2.png" -done - -mkdir scalable -mkdir scalable/$3 -cp $1 ./scalable/$3/$2 -gzip --suffix=.svgz scalable/$3/$2 -echo "moving ${1} to scalable/$3/$2.svgz" - -rm $1 diff --git a/5.3/misc/temp/mkicons.sh b/5.3/misc/temp/mkicons.sh new file mode 100755 index 0000000..4693a87 --- /dev/null +++ b/5.3/misc/temp/mkicons.sh @@ -0,0 +1,25 @@ +#! /bin/bash + +if [ -z "$1" ]; then + echo "Icon Resizer" + echo "Base SVG must be in same dir as script" + echo "usage: $0 input.svg category icon-name" + exit +fi + +mkdir fdo-icons-sabayon +cp $1 fdo-icons-sabayon +cd fdo-icons-sabayon + +for i in 8x8 16x16 22x22 24x24 32x32 48x48 64x64 128x128 256x256 ; do + echo "converting ${1} to $i/$2/$3.png" + mkdir -p $i/$2 + convert -filter Lanczos -background \#00000000 -resize $i\! $1 $i/$2/$3.png +done + +echo "moving ${1} to scalable/$2/$3.svgz" +mkdir -p scalable/$2 +cp $1 ./scalable/$2/$3 +gzip -c scalable/$2/$3 > scalable/$2/$3.svgz + +rm $1