Functions Index :: S :: SetDefaultResizer

[<< up one level]


filters :: resize


SetDefaultResizer(string resizer, val "rsz_param1", val "rsz_param2")


Sets the default resizer that is used by the Resize... family of filters when the resizer parameter does not explicitly be supplied to them.

Thus, SetDefaultResizer is the master mechanism for the user to control which resizer a filter will use; simply place a call to SetDefaultResizer with adequate arguments before calling the resizing filter.

Note that since Resize is used internally by many AVSLib filters (such as for example LineAnim, StackToFit, etc.), setting the resizer with SetDefaultResizer affects any subsequent calls to those filters in the script.


resizer: The name of the resizer. One of "Bicubic", "Bilinear", "Lanczos", "Lanczos4", "Spline16", "Spline32", "Gauss" or "Point" ie the first part of a specific Avisynth resize filter. Passing the entire filter name of the resizer is also supported.

rsz_param1, rsz_param2 (Optional): Additional parameters needed by the resizer (for example b, c for BicubicResize, taps from LanczosResize, etc.); see Avisynth documentation for details.

Notes and conditions on arguments relations:

1] After a call to SetDefaultResizer, all subsequent invocations of any of the Resize... family of filters (and thus any filter also that uses them internally) will use the resizer specified, until the next call to SetDefaultResizer (unless of course specific values are passed to them as arguments).

2] The initial library default for resizer is "Bilinear". This is the resizer that will be used if no call to SetDefaultResizer has been made inside the script.


#default to bicubic resizing with b=0, c=1/2

dummy = SetDefaultResizer("Bicubic", 0, 1/2)

# now call a filter that uses Resize

clip2 = clip1.ResizeToFit(720, 480, RTF_ZOOM)


[<< top]