Advertisement
Guest User

Untitled

a guest
Apr 20th, 2012
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.94 KB | None | 0 0
  1.  
  2. # to use the mrotateOxOy macro, go to the directory where all your video images are and:
  3. # gmic $(ls|head -100) -a z ../macro.gmic -mrotateOxOy
  4. mrotateOxOy:
  5.   #initialisation
  6.   rox=0 roy=0       #rotation angle
  7.   drox=0 droy=0     #rotation angle variation
  8.   image_number=101  #image to load
  9.   -v -
  10.   -repeat 10000
  11.     #rotate Oy et Ox
  12.     --permute xzyc -rotate[-1] $roy,0,1,50%,50%
  13.     -permute[-1] zyxc -rotate[-1] $rox,0,1,50%,50%
  14.     -permute[-1] zxyc
  15.     #extract the image et erase
  16.     -crop[-1] 0,0,50%,100%,100%,50%
  17.     -o[-1] ../rotatedOxOy/{100000+$image_number}.png -rm[-1]
  18.     #rotation angle varies
  19.     drox={$drox*0.9+(?-0.5)-($rox*abs($rox)/800)}
  20.     droy={$droy*0.9+(?-0.5)-($roy*abs($roy)/800)}
  21.     rox={$rox+$drox} roy={$roy+$droy}
  22.     -v + -e $rox,$roy,$drox,$droy -v -
  23.     #one step ahead in time
  24.     -i {10000+$image_number}.jpg
  25.     -a[0,-1] z
  26.     -crop[0] 0,0,1,100%,100%,99
  27.     image_number={$image_number+1}
  28.   -done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement