You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
407 B
17 lines
407 B
#!/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;
|