From 0a5b7c629779fca4d20112a1db20fe8e9adec581 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 19 Nov 2023 15:52:44 -0500 Subject: [PATCH] Fix deprecated PIL resizing Image.ANTIALIAS is deprecated. Replacing with the suggested replacement Image.Resampling.LANCZOS see https://github.com/mpetroff/pannellum/issues/1119 --- moviepy/video/fx/resize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moviepy/video/fx/resize.py b/moviepy/video/fx/resize.py index 7afd61898..94322153f 100644 --- a/moviepy/video/fx/resize.py +++ b/moviepy/video/fx/resize.py @@ -37,7 +37,7 @@ def resizer(pic, new_size): # newshape = (new_size[0], new_size[1]) pil_img = Image.fromarray(pic) - resized_pil = pil_img.resize(new_size[::-1], Image.LANCZOS) + resized_pil = pil_img.resize(new_size[::-1], Image.Resampling.LANCZOS) # arr = np.fromstring(resized_pil.tostring(), dtype="uint8") # arr.reshape(newshape) return np.array(resized_pil)