updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / nautilus-gkim / GKIM_resize
blobc8a82d20733b9dfafdc5db9e27a6fcb5c601a83e
1 #!/bin/bash
2 # Resize image
3 FILE=""
5 if SCALE=`zenity --entry --title="Titre" --text="Veuillez saisir la résolution des images" --entry-text="600x450"`
6 then
7 echo "SCALE = $SCALE";
8 else
9 exit 0;
13 W=`echo $SCALE | sed 's/[^0-9]/ /g' | awk '{print $1}'`;
14 H=`echo $SCALE | sed 's/[^0-9]/ /g' | awk '{print $2}'`;
17 (compteur=0
18 for i in "$@";do
19 if [ -f "$i" ];then
20 let "compteur +=1"
21 FILE="$i"
22 convert -resize $SCALE "$FILE" "$FILE";
23 echo "$compteur";
24 fi;
25 done
26 )| zenity --progress --auto-close\
27 --title="Resize" \
28 --text="traitement" \
29 --percentage=0;