-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathcrop_images.sh
executable file
·51 lines (31 loc) · 2.01 KB
/
crop_images.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
#!/bin/bash
# 75x55
# 1093x825
IMAGE_X=1093
IMAGE_Y=825
FRAME_X=75
FRAME_Y=55
convert src/webstatic/questplay/frame.png \
-crop $(($FRAME_X))x$(($FRAME_Y*3))+$((0))+$((0)) src/webstatic/questplay/frame-left-top.png
convert src/webstatic/questplay/frame.png \
-crop $(($FRAME_X*2))x$(($FRAME_Y))+$(($FRAME_X))+$((0)) src/webstatic/questplay/frame-left-top-2.png
convert src/webstatic/questplay/frame.png \
-crop $(($IMAGE_X - $FRAME_X*6))x$(($FRAME_Y))+$(($FRAME_X*3))+$((0)) src/webstatic/questplay/frame-top.png
convert src/webstatic/questplay/frame.png \
-crop $(($FRAME_X*2))x$(($FRAME_Y))+$(($IMAGE_X - $FRAME_X*3))+$((0)) src/webstatic/questplay/frame-right-top-2.png
convert src/webstatic/questplay/frame.png \
-crop $(($FRAME_X))x$(($FRAME_Y*3))+$(($IMAGE_X - $FRAME_X))+$((0)) src/webstatic/questplay/frame-right-top.png
convert src/webstatic/questplay/frame.png \
-crop $(($FRAME_X))x$(($IMAGE_Y - $FRAME_Y*6))+$((0))+$(($FRAME_Y*3)) src/webstatic/questplay/frame-left.png
convert src/webstatic/questplay/frame.png \
-crop $(($FRAME_X))x$(($IMAGE_Y - $FRAME_Y*6))+$(($IMAGE_X - $FRAME_X))+$(($FRAME_Y*3)) src/webstatic/questplay/frame-right.png
convert src/webstatic/questplay/frame.png \
-crop $(($FRAME_X))x$(($FRAME_Y*3))+$((0))+$(($IMAGE_Y - $FRAME_Y*3)) src/webstatic/questplay/frame-left-bottom.png
convert src/webstatic/questplay/frame.png \
-crop $(($FRAME_X*2))x$(($FRAME_Y))+$(($FRAME_X))+$(($IMAGE_Y - $FRAME_Y)) src/webstatic/questplay/frame-left-bottom-2.png
convert src/webstatic/questplay/frame.png \
-crop $(($IMAGE_X - $FRAME_X*6))x$(($FRAME_Y))+$(($FRAME_X*3))+$(($IMAGE_Y - $FRAME_Y)) src/webstatic/questplay/frame-bottom.png
convert src/webstatic/questplay/frame.png \
-crop $(($FRAME_X*2))x$(($FRAME_Y))+$(($IMAGE_X - $FRAME_X*3))+$(($IMAGE_Y - $FRAME_Y)) src/webstatic/questplay/frame-right-bottom-2.png
convert src/webstatic/questplay/frame.png \
-crop $(($FRAME_X))x$(($FRAME_Y*3))+$(($IMAGE_X - $FRAME_X))+$(($IMAGE_Y - $FRAME_Y*3)) src/webstatic/questplay/frame-right-bottom.png