Functions Index :: R :: ResizeToTarget

[<< up one level]

Module:

filters :: resize

Definition:

ResizeToTarget(clip base, clip target, string "resizer", val "rsz_param1", val "rsz_param2", bool "interlaced")

Description:

Resizes base clip to the same dimensions that target clip has, possibly with a colorspace conversion.

The later is done only if calling the Resize filter to adjust dimensions would crash Avisynth (at least on some versions) or would result in an error dialog box. This on turn depends both on base's and target's colorspaces and on target's dimensions.

Arguments:

resizer, rsz_param1, rsz_param2, interlaced (optional): Have the same function as the Resize() filter.

Notes and conditions on arguments relations:

1] The filter uses internally the Resize filter in order to execute clip resizing when needed. To control which specific Avisynth resizer will be used by the filter place a call to SetDefaultResizer with appropriate parameters before calling the filter.

2] If target is a badly cropped (for its colorspace) source or if a wrong interlaced argument is passed to the filter, the final dimensions of the returned clip may deviate slightly from the dimensions of target clip, due to the behavior of the Resize filter. This is however a condition that is not encountered in normal use situations.

Examples:

c = AVISource(...)

#default to lanczos resizing with Avisynth-default taps

dummy = SetDefaultResizer("lanczos")

d = AVISource(...)

d = d.ResizeToTarget(c)

# d now has same dimensions as c (with the only possible

# exception of c being a badly cropped source)

 

[<< top]