-
Notifications
You must be signed in to change notification settings - Fork 1
/
image_trimage.sh
executable file
·56 lines (47 loc) · 1.14 KB
/
image_trimage.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
echo $1
if [ -z $1 ]; then
for file in *.png
do
echo $file start #Add a empty line to split the output
convert -trim "$file" "$file"
trimage -f "$file" &
echo $file end #Add a empty line to split the output
done
for file in *.jpg
do
echo $file start #Add a empty line to split the output
convert -trim "$file" "$file"
trimage -f "$file" &
echo $file end #Add a empty line to split the output
done
for file in *.jpeg
do
echo $file start #Add a empty line to split the output
trimage -f "$file" &
echo $file end #Add a empty line to split the output
done
for file in *.JPG
do
echo $file start #Add a empty line to split the output
trimage -f "$file" &
echo $file end #Add a empty line to split the output
done
for file in *.tiff
do
echo $file start #Add a empty line to split the output
trimage -f "$file" &
echo $file end #Add a empty line to split the output
done
for file in *.tif
do
echo $file start #Add a empty line to split the output
trimage -f "$file" &
echo $file end #Add a empty line to split the output
done
else
trimage $1
fi
echo ====ONLY_Waiting====
wait
echo finish