Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.07k stars 1.51k forks source link

AttributeError: 'numpy.ndarray' object has no attribute 'point' #2102

Closed sugizo closed 4 months ago

sugizo commented 5 months ago

Expected Behavior

can work with pilgram2 python module

Actual Behavior

not work with pilgram2 and have an error

AttributeError                            Traceback (most recent call last)
[<ipython-input-6-e96ac98275c5>](https://localhost:8080/#) in <cell line: 1>()
----> 1 video0 = video0.fl_image(tes)

9 frames
<decorator-gen-178> in set_make_frame(self, mf)

<decorator-gen-128> in get_frame(self, t)

[/usr/local/lib/python3.10/dist-packages/pilgram2/css/brightness.py](https://localhost:8080/#) in brightness(im, amount)
     40     assert amount >= 0
     41 
---> 42     return im.point(lambda x: round(x * amount))

AttributeError: 'numpy.ndarray' object has no attribute 'point'

Steps to Reproduce the Problem

!wget -c https://cdn.creatomate.com/demo/mountains.mp4
pip install -U moviepy pilgram2
from moviepy.editor import *
import pilgram2
import pilgram2.css
import pilgram2.css.blending
def tes(image):
    return pilgram2.css.brightness(image)
video0 = VideoFileClip("mountains.mp4")
video0 = video0.fl_image(tes)

Specifications

test pilgram 2 with the same python version and same google colab platform it's work well image

thanks and best regards

keikoro commented 4 months ago

Closing, see https://github.com/Zulko/moviepy/issues/2105#issuecomment-1937111760.