-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathim_annotation_2
46 lines (40 loc) · 1.55 KB
/
im_annotation_2
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
#!/bin/sh
#
# Shell equivelent of the perl version (using -annotate option)
#
#font='-adobe-helvetica-medium-r-normal--25-180-100-100-p-130-iso8729-1';
#font='Times';
font='Arial';
o=100 x=$o y=$o
o2=`expr $x \* 2`
o3=`expr $x \* 3`
o5=`expr $x \* 5`
o6=`expr $x \* 6`
for a in 0 30 60 90 120 150 180 210 240 270 300 330
do
echo "angle $a"
magick -size ${o6}x${o6} xc:white \
-stroke '#600' -fill none \
-draw "line $o3,$o $o3,$o5" \
-draw "line $o,$o3 $o5,$o3" \
-draw "rectangle $o,$o $o5,$o5" \
-stroke none -fill black -box yellow -pointsize 24 -font $font \
-gravity None -annotate "${a}x$a+$o2+$o2" 'Default' \
-gravity NorthWest -annotate "${a}x$a+$x+$y" 'North West' \
-gravity North -annotate "${a}x$a+0+$y" 'North' \
-gravity NorthEast -annotate "${a}x$a+$x+$y" 'North East' \
-gravity West -annotate "${a}x$a+$x+0" 'West' \
-gravity Center -annotate "${a}x$a+0+0" 'Center' \
-gravity East -annotate "${a}x$a+$x+0" 'East' \
-gravity SouthWest -annotate "${a}x$a+$x+$y" 'South West' \
-gravity South -annotate "${a}x$a+0+$y" 'South' \
-gravity SouthEast -annotate "${a}x$a+$x+$y" 'South East' \
annotate_angle_`printf "%03d" $a`.miff
done
echo "Creating animation"
magick -delay 20 annotate_angle_*.miff im_annotate_sh2.gif
rm annotate_angle_*.miff
echo "Animating"
exec magick animate im_annotate_sh2.gif
# Optimization Program
gifsicle -b -O2 im_annotate_sh2.gif