Open JoelOnyedika opened 2 weeks ago
@JoelOnyedika create a PR with the changes
Is there a workaround in the meantime that I can I use? I guess I can downgrade pillow.
Is there a workaround in the meantime that I can I use? I guess I can downgrade pillow.
Well downgrade your pillow version and it fixes the issue. Honestly for me i just gave up on moviepy, the workarounds are juat too much for my production grade application so ai went to react remotion because its just css bro
Description
The current implementation of
resize.py
uses the deprecatedPIL.Image.ANTIALIAS
which was removed in newer versions of Pillow. This causes issues for users trying to use MoviePy with current Pillow versions.Current Behavior
When trying to use the resize functionality with current Pillow versions (>=10.0.0), the following error occurs:
Expected Behavior
The resize functionality should work with current Pillow versions using the new
Image.Resampling.LANCZOS
instead of the deprecatedANTIALIAS
.Proposed Solution
Here's a proposed update to the resize implementation that maintains compatibility:
Additional Context
There are two proposed methods in the solution:
scipy.ndimage.zoom
: Generally better performance for video processingTemporary Workaround
For users encountering this issue, there are two temporary solutions:
pip install Pillow==9.5.0
)Environment
Impact
This affects all users trying to use MoviePy with current versions of Pillow, particularly in production environments where using older versions of dependencies isn't ideal.
Would appreciate feedback on the proposed solution or alternative approaches.