diff options
Diffstat (limited to 'public/menu/redimensionnement.sh')
-rwxr-xr-x | public/menu/redimensionnement.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/public/menu/redimensionnement.sh b/public/menu/redimensionnement.sh new file mode 100755 index 0000000..fb78510 --- /dev/null +++ b/public/menu/redimensionnement.sh | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | a=0 | ||
4 | |||
5 | b=".jpg" | ||
6 | for a in `ls | grep $b` | ||
7 | do | ||
8 | # retire l'extention | ||
9 | a=`echo $a | cut -f1 -d'.'` | ||
10 | |||
11 | # les guillemets permettent la concaténation | ||
12 | magick $a$b -scale 76% "$a"_petit"$b" | ||
13 | magick $a$b -scale 50.5% "$a"_mini"$b" | ||
14 | done | ||
15 | |||
16 | b=".png" | ||
17 | for a in `ls | grep $b` | ||
18 | do | ||
19 | # retire l'extention | ||
20 | a=`echo $a | cut -f1 -d'.'` | ||
21 | |||
22 | # les guillemets permettent la concaténation | ||
23 | magick $a$b -scale 76% "$a"_petit"$b" | ||
24 | magick $a$b -scale 50.5% "$a"_mini"$b" | ||
25 | done | ||