[misc/scripts/mkicons.sh] Add 24px icons, provide both svg & svgz

This commit is contained in:
Ian Whyman
2010-05-20 19:12:35 +01:00
parent 515efd85f9
commit 9fa4dbd590
2 changed files with 25 additions and 28 deletions
-28
View File
@@ -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
+25
View File
@@ -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