Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pillow version 10 error in resizing video #2057

Closed
alimirjahani7 opened this issue Oct 21, 2023 · 7 comments
Closed

Pillow version 10 error in resizing video #2057

alimirjahani7 opened this issue Oct 21, 2023 · 7 comments
Labels
bug Issues that report (apparent) bugs. images Related to ImageClip, or handling of images in general. lib-PIL-Pillow Issues pertaining to dependency PIL (or PIL fork Pillow).

Comments

@alimirjahani7
Copy link

Expected Behavior

generate a video with reduced size

Actual Behavior

raise exception AttributeError("module 'PIL.Image' has no attribute 'ANTIALIAS'")

Steps to Reproduce the Problem

install pillow version 10

Specifications

looks like pillow version 10 removed the support for ANTIALIAS
https://stackoverflow.com/questions/76616042/attributeerror-module-pil-image-has-no-attribute-antialias

@alimirjahani7 alimirjahani7 added the bug Issues that report (apparent) bugs. label Oct 21, 2023
@Goyet-Christopher
Copy link

Already fix (issue #2002) by the pull request #2003.
(#2003 but I'm not sure in which version of MoviePy this has been fixed)

File moviepy/video/fx/resize.py:
resized_pil = pil_img.resize(new_size[::-1], Image.ANTIALIAS)
was replaced by :
resized_pil = pil_img.resize(new_size[::-1], Image.LANCZOS)

Hoping that I have been helpful ;)

@alimirjahani7
Copy link
Author

Thanks
but I checked and faced this error in the latest version of moviepy

@PetroTruman
Copy link

PetroTruman commented Oct 23, 2023

I had same problem. I fixed it jast installing opencv-python it works for me.
because Moviepy use external moduls for resize function.
a find answer hear #2002

@Kaszanas
Copy link

Already fix (issue #2002) by the pull request #2003. (#2003 but I'm not sure in which version of MoviePy this has been fixed)

File moviepy/video/fx/resize.py: resized_pil = pil_img.resize(new_size[::-1], Image.ANTIALIAS) was replaced by : resized_pil = pil_img.resize(new_size[::-1], Image.LANCZOS)

Hoping that I have been helpful ;)

Latest release of moviepy is 1.0.3, and it is from May 7 2020, hence any of the fixes that have been made are unlikely to be live on PyPI. It would be a good idea to have one of the fixed versions released on PyPI for everyone to use.

@alimirjahani7
Copy link
Author

Another repo with update code which don't release any more :/(

@Kaszanas
Copy link

Another repo with update code which don't release any more :/(

I think that unfortunately that is true. Most of the functionality is still there though. I think there is a PR that aims to be a 2.0 release of moviepy. I am not sure who is a contributor that could make the decision to include the changes and go forward with all of this.

@keikoro keikoro added images Related to ImageClip, or handling of images in general. lib-PIL-Pillow Issues pertaining to dependency PIL (or PIL fork Pillow). labels Feb 10, 2024
@keikoro
Copy link
Collaborator

keikoro commented Feb 10, 2024

Closing this as duplicate of #2072, which seems to be the only ticket referencing the library's actual release notes.

@keikoro keikoro closed this as completed Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that report (apparent) bugs. images Related to ImageClip, or handling of images in general. lib-PIL-Pillow Issues pertaining to dependency PIL (or PIL fork Pillow).
Projects
None yet
Development

No branches or pull requests

5 participants