diff --git a/vskernels/kernels/complex.py b/vskernels/kernels/complex.py index d2a236c..cd0a009 100644 --- a/vskernels/kernels/complex.py +++ b/vskernels/kernels/complex.py @@ -201,7 +201,7 @@ def scale( # type: ignore[override] padded = border_handling.prepare_clip(clip, self.kernel_radius) shift, clip = tuple( - s + ((p - c) // 2) for s, c, p in zip(shift, *((x.width, x.height) for x in (clip, padded))) + s + ((p - c) // 2) for s, c, p in zip(shift, *((x.height, x.width) for x in (clip, padded))) ), padded clip = Scaler.scale(self, clip, width, height, shift, **kwargs) diff --git a/vskernels/types.py b/vskernels/types.py index 7472990..4d043bb 100644 --- a/vskernels/types.py +++ b/vskernels/types.py @@ -29,7 +29,7 @@ def prepare_clip(self, clip: vs.VideoNode, min_pad: int = 2) -> vs.VideoNode: case BorderHandling.MIRROR: return padder.MIRROR(*args) case BorderHandling.ZERO: - return padder.COLOR(*args) + return padder.COLOR(color=False if clip.format.color_family is vs.RGB else (False, None), *args) case BorderHandling.REPEAT: return padder.REPEAT(*args)