mirror of https://github.com/patacrep/patacrep.git
Alexandre Dupas
16 years ago
1 changed files with 17 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||||
|
#!/bin/sh |
||||
|
# Resize image if needed |
||||
|
|
||||
|
for image in songs/*/*.jpg songs/*/*.png ; |
||||
|
do |
||||
|
SIZE=`identify $image | awk '{ print $3}' | sed 's/x/ /'`; |
||||
|
XSIZE=`echo $SIZE | awk '{ print $1}'`; |
||||
|
YSIZE=`echo $SIZE | awk '{ print $2}'`; |
||||
|
|
||||
|
if [ $((XSIZE)) -gt 128 ] |
||||
|
then |
||||
|
convert $image -resize 128x128 $image; |
||||
|
elif [ $((YSIZE)) -gt 128 ] |
||||
|
then |
||||
|
convert $image -resize 128x128 $image; |
||||
|
fi |
||||
|
done; |
Loading…
Reference in new issue