summaryrefslogtreecommitdiff
path: root/macros/xetex/plain/do-it-yourself-tex/SHELL-FILES/rotate
blob: 46265ede15b81b698d695f25b58322caaa0d413c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# rotate
# rotates file $2 by $1 degrees  
# for negative angles needs "0" : -0.4
# the resulting file has the statement $1degrees_ before the old file name
# this is useful if one has a small rotation to make to "straighten" a photograph
# one can quickly try a series of small rotations  -0.4, -0.5 etc

# example of usage:
#  rotate -0.4 panda.png ==>  -0.4degrees_panda.png


# keeps original, because name is changed
#1 refers to the number of degrees to rotate. 
#  only one file, viz. $2, is involved

  convert -rotate $1 $2  $1degrees_$2