Log in

View Full Version : Crop


VoodooFX
29th October 2021, 23:46
clp.crop(left=0, top=0, right=-4, bottom=-4)
Gives me "Invalid arguments to function 'crop'", what I'm missing here?

clp.crop(0, 0, -4, -4) works OK.

StainlessS
30th October 2021, 00:05
Here is the C/CPP spec thingy


Crop "ciiii[align]b"


and from [OLD] builtin help

Crop (clip, int left, int top, int width, int height, bool "align")

Only align is named and optional.

EDIT: Same on Wiki:- http://avisynth.nl/index.php/Crop

Crop(clip clip, int left, int top, int width, int height [, bool align ] )
Crop(clip clip, int left, int top, int -right, int -bottom [, bool align ] )


EDIT: To below: aint no prize for 2nd place. :) [sadly, aint no prize for 1st place either :( ]

Reel.Deel
30th October 2021, 00:05
clp.crop(left=0, top=0, right=-4, bottom=-4)
Gives me "Invalid arguments to function 'crop'", what I'm missing here?

clp.crop(0, 0, -4, -4) works OK.

Crop does not accept named arguments besides "align".
https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/filters/transform.cpp#L50

EDIT
@StainlessS: you beat me by a few seconds :)

VoodooFX
30th October 2021, 00:39
Oh, thats why. This should be written in wiki for a next stupid person like me. :)