You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't get my gif to play once or loop a fixed amount of times, after looking at the declaration for this function on line 282 the parameter is missing from imageio.save() so the the variable is never passed through. Modifying it to the following fixed the issue:
def write_gif_with_image_io(clip, filename, fps=None, opt=0, loop=0,
colors=None, verbose=True):
"""
Writes the gif with the Python library ImageIO (calls FreeImage).
For the moment ImageIO is not installed with MoviePy. You need to install
imageio (pip install imageio) to use this.
Parameters
-----------
opt
"""
if colors is None:
colors=256
if not IMAGEIO_FOUND:
raise ImportError("Writing a gif with imageio requires ImageIO installed,"
" with e.g. 'pip install imageio'")
if fps is None:
fps = clip.fps
quantizer = 0 if opt!= 0 else 'nq'
writer = imageio.save(filename, duration=1.0/fps,
quantizer=quantizer, palettesize=colors, loop=loop)
verbose_print(verbose, "\n[MoviePy] Building file %s with imageio\n"%filename)
for frame in clip.iter_frames(fps=fps, progress_bar=True, dtype='uint8'):
writer.append_data(frame)
The text was updated successfully, but these errors were encountered:
I am looking at turning this into a pull request (or you could do so yourself). Are you able to provide a test case that works now and didn't work before (and doesn't require someone to manually view the gif?)
I couldn't get my gif to play once or loop a fixed amount of times, after looking at the declaration for this function on line 282 the parameter is missing from imageio.save() so the the variable is never passed through. Modifying it to the following fixed the issue:
The text was updated successfully, but these errors were encountered: