VideoHelp Forum




+ Reply to Thread
Results 1 to 2 of 2
  1. Member
    Join Date
    Feb 2001
    Location
    Berlin, Germany
    Search Comp PM
    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.
    Quote Quote  
  2. Member
    Join Date
    Feb 2001
    Location
    Berlin, Germany
    Search Comp PM
    Problem solved. Well, almost. I have changed YUY2 to RGB32, then it works fine.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!