Video editing with Python
Add int() wrapper to prevent floats
Tom Burrows0948e7a25e79
diff --git a/moviepy/video/fx/scroll.py b/moviepy/video/fx/scroll.pyindex 59a285c9..cd98a1d9 100644--- a/moviepy/video/fx/scroll.py+++ b/moviepy/video/fx/scroll.py@@ -11,8 +11,8 @@ def scroll(clip, h=None, w=None, x_speed=0, y_speed=0,ymax = clip.h-h-1def f(gf,t):- x = max(0, min(xmax, x_start+ np.round(x_speed*t)))- y = max(0, min(ymax, y_start+ np.round(y_speed*t)))+ x = int(max(0, min(xmax, x_start+ np.round(x_speed*t))))+ y = int(max(0, min(ymax, y_start+ np.round(y_speed*t))))return gf(t)[y:y+h, x:x+w]return clip.fl(f, apply_to = apply_to)