Script file generated from LiVES
|1.7
NonlinearZoom
1
Christopher Night|
Nonlinear Zoom/Pan|Zooming/panning|2|1|
convert
cx0|Center _X|num0|200|0|9999|
cy0|Center _Y|num0|150|0|9999|
sx0|_Width|num0|400|0|9999|
sy0|_Height|num0|300|0|9999|
aspect0|_Maintain aspect ratio|bool|1|
source0||string_list|0|copy from...|preview window|final subwindow|full window|
cx1|Center _X|num0|200|0|9999|
cy1|Center _Y|num0|150|0|9999|
sx1|_Width|num0|400|0|9999|
sy1|_Height|num0|300|0|9999|
aspect1|_Maintain aspect ratio|bool|1|
source1||string_list|0|copy from...|preview window|initial subwindow|full window|
r|_Slowdown parameter|num1|6.0|-20.0|20.0|
mx0|_x0|num0|0|0|9999|
mx1|_x1|num0|0|0|9999|
my0|_y0|num0|400|0|9999|
my1|_y1|num0|300|0|9999|
antialias|Apply _antialiasing|bool|1|
layout|"Initial subwindow: These settings define the first frame of the effect."|
layout|p0|p1|
layout|p2|p3|
layout|p4|p5|
layout|hseparator|
layout|"Final subwindow: These settings define the last frame of the effect."|
layout|p6|p7|
layout|p8|p9|
layout|p10|p11|
layout|hseparator|
layout|"Setting this to 0 gives you a linear zoom/pan."|
layout|"A positive value means it starts abruptly and ends gradually."|
layout|"A negative value means the other way around."|
layout|p12|
layout|hseparator|
layout|p17|
layout|hseparator|
layout|"You can draw on the preview window to select either the initial or final subwindow."|
layout|"After drawing pick 'copy from preview window' under the appropriate subwindow above."|
layout|"These numbers will update automatically, so you shouldn't need to edit them."|
layout|p13|p14|p15|p16|
special|framedraw|rectdemask|13|15|14|16|
0x0001
0xF0
$resize_ext = $out_ext;
if ($p17) {
$antialias="true";
}
else {
$antialias="false";
}
$z = ($frame - $start) / ($end - $start);
if ($p12) { $z = (exp(-$p12 * $z) - 1.) / (exp(-$p12) - 1.); }
$cx = int($p0 + ($p6 - $p0) * $z + 0.5);
$cy = int($p1 + ($p7 - $p1) * $z + 0.5);
$sx = int($p2 + ($p8 - $p2) * $z + 0.5);
$sy = int($p3 + ($p9 - $p3) * $z + 0.5);
$x0 = $cx - $sx / 2;
$y0 = $cy - $sy / 2;
if ($x0 < 0) { $x0 = 0; }
if ($y0 < 0) { $y0 = 0; }
$input_ext = $img_ext;
&trim_frame($name, $width, $height, $x0, $y0, $sx, $sy);
$input_ext = $resize_ext;
&resize_frame($name, $width, $height);
init|if($p2_max>$width){$p2=$p2_max=$p8=$p8_max=$p13_max=$p14=$p14_max=$width; $p3=$p3_max=$p9=$p9_max=$p15_max=$p16=$p16_max=$height; $p0_max=$p0_min=$p0=$p6_max=$p6_min=$p6=$width/2.; $p1_max=$p1_min=$p1=$p7_max=$p7_min=$p7=$height/2.;}
2|$p0_min=$p2/2.; $p0_max=$width-$p2/2.; if($p4){$p3=$p2*$height/$width; $p1_min=$p3/2.; $p1_max=$height-$p3/2.; }
3|$p1_min=$p3/2.; $p1_max=$height-$p3/2.; if($p4){$p2=$p3*$width/$height; $p0_min=$p2/2.; $p0_max=$width-$p2/2.; }
4|if($p4){$f=sqrt($p2*$p3/($width*$height)); $p2=$f*$width; $p3=$f*$height; $p0_min=$p2/2.; $p0_max=$width-$p2/2.; $p1_min=$p3/2.; $p1_max=$width-$p3/2.; }
5|if($p5==1){ $p0=($p13+$p14)/2; $p1=($p15+$p16)/2; $p2=$p14-$p13; $p3=$p16-$p15; } elsif($p5==2){ $p0=$p6; $p1=$p7; $p2=$p8; $p3=$p9; } elsif($p5==3) { $p0=$width/2.; $p1=$height/2.; $p2=$width; $p3=$height; } $p5=0; if($p4){$f=sqrt($p2*$p3/($width*$height)); $p2=$f*$width; $p3=$f*$height; } $p0_min=$p2/2.; $p0_max=$width-$p2/2.; $p1_min=$p3/2.; $p1_max=$height-$p3/2.;
8|$p6_min=$p8/2.; $p6_max=$width-$p8/2.; if($p10){$p9=$p8*$height/$width; $p7_min=$p9/2.; $p7_max=$height-$p9/2.; }
9|$p7_min=$p9/2.; $p7_max=$height-$p9/2.; if($p10){$p8=$p9*$width/$height; $p6_min=$p8/2.; $p6_max=$width-$p8/2.; }
10|if($p10){$f=sqrt($p8*$p9/($width*$height)); $p8=$f*$width; $p9=$f*$height; $p6_min=$p8/2.; $p6_max=$width-$p8/2.; $p7_min=$p9/2.; $p7_max=$width-$p9/2.; }
11|if($p11==1){ $p6=($p13+$p14)/2; $p7=($p15+$p16)/2; $p8=$p14-$p13; $p9=$p16-$p15; } elsif($p11==2){ $p6=$p0; $p7=$p1; $p8=$p2; $p9=$p3; } elsif($p11==3) { $p6=$width/2.; $p7=$height/2.; $p8=$width; $p9=$height; } $p11=0; if($p10){$f=sqrt($p8*$p9/($width*$height)); $p8=$f*$width; $p9=$f*$height; } $p6_min=$p8/2.; $p6_max=$width-$p8/2.; $p7_min=$p9/2.; $p7_max=$height-$p9/2.;