Add script to regenerate large padded icons from smaller ones
This commit is contained in:
parent
6f31a864fe
commit
292465fb06
22
icons/regenerate-padded.sh
Executable file
22
icons/regenerate-padded.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
generate() {
|
||||||
|
cd "$1"
|
||||||
|
destinationDir="$2"
|
||||||
|
border="${3}x${3}"
|
||||||
|
for file in `find -type f -name "*.png"`; do
|
||||||
|
destination="$destinationDir/$file"
|
||||||
|
convert "$file" \
|
||||||
|
-bordercolor Transparent \
|
||||||
|
-border "$border" \
|
||||||
|
-background Transparent \
|
||||||
|
"../../${destination}"
|
||||||
|
done
|
||||||
|
cd -
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -z "$1" ] && echo "provide source <pack>/<size>" && exit 2;
|
||||||
|
[ -z "$2" ] && echo "provide destination <pack>/<size>" && exit 2;
|
||||||
|
[ -z "$3" ] && echo "provide border width" && exit 2;
|
||||||
|
|
||||||
|
generate "$1" "$2" "$3"
|
Loading…
Reference in New Issue
Block a user