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").BicubicResiz e(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.
+ Reply to Thread
Results 1 to 2 of 2
-
-
Problem solved. Well, almost. I have changed YUY2 to RGB32, then it works fine.
Similar Threads
-
Avisynth - How to resize a 720p video, internally 1024x760??
By Cauptain in forum EditingReplies: 13Last Post: 8th Apr 2012, 10:59 -
How do I zoom out and move picture with avisynth
By xicudiz in forum EditingReplies: 6Last Post: 31st Mar 2011, 17:28 -
Avisynth Aspect Ratio Resize Help
By t4com4 in forum Newbie / General discussionsReplies: 9Last Post: 1st Oct 2010, 10:30 -
Get many error messages, AviSynth error message and meGUI error
By MKVcrazy in forum Video ConversionReplies: 0Last Post: 25th Aug 2007, 16:41 -
Auto resize Image in Avisynth
By GioBarque in forum Newbie / General discussionsReplies: 8Last Post: 21st Jul 2007, 12:02