Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # to use the mrotateOxOy macro, go to the directory where all your video images are and:
- # gmic $(ls|head -100) -a z ../macro.gmic -mrotateOxOy
- mrotateOxOy:
- #initialisation
- rox=0 roy=0 #rotation angle
- drox=0 droy=0 #rotation angle variation
- image_number=101 #image to load
- -v -
- -repeat 10000
- #rotate Oy et Ox
- --permute xzyc -rotate[-1] $roy,0,1,50%,50%
- -permute[-1] zyxc -rotate[-1] $rox,0,1,50%,50%
- -permute[-1] zxyc
- #extract the image et erase
- -crop[-1] 0,0,50%,100%,100%,50%
- -o[-1] ../rotatedOxOy/{100000+$image_number}.png -rm[-1]
- #rotation angle varies
- drox={$drox*0.9+(?-0.5)-($rox*abs($rox)/800)}
- droy={$droy*0.9+(?-0.5)-($roy*abs($roy)/800)}
- rox={$rox+$drox} roy={$roy+$droy}
- -v + -e $rox,$roy,$drox,$droy -v -
- #one step ahead in time
- -i {10000+$image_number}.jpg
- -a[0,-1] z
- -crop[0] 0,0,1,100%,100%,99
- image_number={$image_number+1}
- -done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement