1LiVES rendered effect plugin script 2------------------------------------ 3This is a tool, as it MAY_RESIZE 4 5<define> 6|1.8.3 7</define> 8 9<name> 10rotate 11</name> 12 13<version> 142 15</version> 16 17<author> 18Salsaman| 19</author> 20 21# Menu entry|Action description|min_frames|num_channels| 22<description> 23Rotate Clip|Rotating|0|1| 24</description> 25 26# requirements (list) 27<requires> 28convert 29</requires> 30 31# parameters Label|group|type|default|min|max| (list) 32<params> 33cw|90 degrees _Clockwise |bool|1|1| 34acw|90 degrees _Anticlockwise|bool|0|1| 35180|180 _degrees |bool|0|1| 36deg|_degrees|num0|0|-180|180| 37other|_Other|bool|0|1| 38bgcol|_Background Colour|colRGB24|0|0|0| 39</params> 40 41<param_window> 42layout|p0|"(Changes frame size)" 43layout|p1|"(Changes frame size)" 44layout|p2| 45layout|p4|p3|"(May change frame size)" 46layout|hseparator| 47layout|p5| 48layout|"To maintain original frame size, use the "spin" effect." 49</param_window> 50 51# properties/capabilities (bitmap field) 52# 0x0001 == slow (hint to GUI) 53# 0x0002 == may resize all to $nwidth x $nheight 54<properties> 550x0002 56</properties> 57 58# 0xF0 == LiVES-perl 59<language_code> 600xF0 61</language_code> 62 63# pre loop code 64<pre> 65$cstring = &RGB24_to_string($p5_red, $p5_green, $p5_blue); 66$antialias = &config_get("antialias", $configfile); 67$nwidth = $width; 68$nheight = $height; 69 70if ($p0) { 71 $deg = 90; 72 $nheight = $width; 73 $nwidth = $height; 74} 75elsif ($p1) { 76 $deg = -90; 77 $nheight = $width; 78 $nwidth = $height; 79} 80elsif ($p2) { 81 $deg = 180; 82} 83else { 84 $deg = $p3; 85 $nwidth = $nheight = 0; 86} 87$width = $nwidth; 88$height = $nheight; 89</pre> 90 91# loop code 92<loop> 93system ("$convert_command $img_prefix$in -background $cstring -rotate $deg $out_prefix$out"); 94if ($width == 0 || $height == 0) { 95 $imresact = "none"; 96 &get_image_size($out); 97 $width = $hsize; 98 $height = $vsize; 99} 100</loop> 101 102# post loop code 103<post> 104</post> 105 106<onchange> 1073|$p4=1; 108</onchange> 109