Truman
29th November 2002, 18:37
I am still looking for a full working zoom function. The following functions are written by Wilbert Dijkhof. Sometimes it works, sometimes it doesn't and I don't know why.
function overlay(clip clip,clip"LClip",int "width",int "height",int "centerX",int "centerY") {
LClip=BicubicResize(LClip, width, height)
return layer(clip, LClip, "Add", 255, centerX-LClip.width/2, centerY-LClip.height/2)
}
function zoom(clip clip,clip "LClip",int "start_frame",int "start_width",int "start_height",
\ int "end_frame", int "end_width", int "end_height", int "centerX", int "centerY",
\ int "center2X", int "center2Y") {
return Animate(start_frame,end_frame,"overlay",clip,LClip,
\ start_width,start_height,centerX,centerY,
\ clip, LClip, end_width, end_height, center2X, center2Y)
}
clip2=Avisource("d:\clock\clock.avi").BicubicResize(150,150).ConvertToYUY2
clip1=BlankClip(clip2, color=$ff0000)
var=clip1.zoom(clip2, 0, 50, 50, 11, 300, 300, clip1.width/2, clip1.height/2,
\ clip1.width/2, clip1.height/2)
var=DuplicateFrame(var,0)
var=DuplicateFrame(var,12).FadeIO(1)
return var
If I replace the 300 (line 17) with 270, it will work. Otherwise I will get the "unrecognised exception! ( ,line2)" error.:confused:
function overlay(clip clip,clip"LClip",int "width",int "height",int "centerX",int "centerY") {
LClip=BicubicResize(LClip, width, height)
return layer(clip, LClip, "Add", 255, centerX-LClip.width/2, centerY-LClip.height/2)
}
function zoom(clip clip,clip "LClip",int "start_frame",int "start_width",int "start_height",
\ int "end_frame", int "end_width", int "end_height", int "centerX", int "centerY",
\ int "center2X", int "center2Y") {
return Animate(start_frame,end_frame,"overlay",clip,LClip,
\ start_width,start_height,centerX,centerY,
\ clip, LClip, end_width, end_height, center2X, center2Y)
}
clip2=Avisource("d:\clock\clock.avi").BicubicResize(150,150).ConvertToYUY2
clip1=BlankClip(clip2, color=$ff0000)
var=clip1.zoom(clip2, 0, 50, 50, 11, 300, 300, clip1.width/2, clip1.height/2,
\ clip1.width/2, clip1.height/2)
var=DuplicateFrame(var,0)
var=DuplicateFrame(var,12).FadeIO(1)
return var
If I replace the 300 (line 17) with 270, it will work. Otherwise I will get the "unrecognised exception! ( ,line2)" error.:confused: