View Single Post
Old 12th May 2008, 03:03   #32  |  Link
mikeytown2
Resize Abuser
 
mikeytown2's Avatar
 
Join Date: Apr 2005
Location: Seattle, WA
Posts: 623
Quote:
Originally Posted by Gavino View Post
I had to laugh when I saw this. You mean you've managed to reduce about 300 lines of script code to just one?
Surely that's against the spirit of this thread?

There's a lesson here for all of us who have been following this thread - the simple approach is usually the best. To be fair, your requirements were also simpler - pure panning without zooming.

Regarding your solution, if you find the movement jerky, it can be made smoother by using the subpixel cropping feature of the resizers, instead of simple Crop, ie
Code:
Animate(0,143,"Lanczos4Resize",640,480, 864.0,0.0, 640,480, 640,480, 0.0,0.0, 640,480)
(note decimal points are necessary)

@mikeytown2: your latest version seems to allow only zoombox=2, is this intentional?
Yes, what was requested is quite simple! The majority of the code in KBE() is to translate the requested input into something that zoom.dll can use. If you follow the processes inside the function when zoombox=2, with the above example, the only thing that is done is a crop.

Only allowing zoombox=2 was a bug, i commented out the one check that keeps doing that. I can't seem to make it work, i want to check that if they use the cubic option, zoombox should equal 1 or 0, not 2. I also thought the nop() would make this other line not execute, but it still returned.
Code:
#short circuit function, return here if only using zoombox
Return (useZoomBox==2) ? cAlt :nop()
This is now at the bottom, thus no short circuit.

As for using a resize to do the crop, i didn't realize that it can take a float as input!
http://avisynth.org/mediawiki/Resize
I'm going to try to get my ZoomBox code to use this.


KenBurnsEffect() Updated

Last edited by mikeytown2; 12th May 2008 at 10:08.
mikeytown2 is offline   Reply With Quote