Video editing with Python
Replace 'tostring' by 'tobytes' in 'video.io.gif_writers::write_gif' (#1429)
Álvaro Mondéjar09de608ab9e0
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex b1bb09ac..e71de01d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -25,7 +25,7 @@ Lots of method and parameter names have been changed. This will be explained bet### Fixed <!-- for any bug fixes -->- Fixed BitmapClip with fps != 1 not returning the correct frames or crashing [#1333]- Fixed `rotate` sometimes failing with `ValueError: axes don't match array` [#1335]-+- Changed deprecated `tostring` method by `tobytes` in `video.io.gif_writers::write_gif` #1429## [v2.0.0.dev2](https://github.com/zulko/moviepy/tree/v2.0.0.dev2)diff --git a/moviepy/video/io/gif_writers.py b/moviepy/video/io/gif_writers.pyindex b08aac44..dc4896b1 100644--- a/moviepy/video/io/gif_writers.py+++ b/moviepy/video/io/gif_writers.py@@ -320,7 +320,7 @@ def write_gif(if with_mask:mask = 255 * clip.mask.get_frame(t)frame = np.dstack([frame, mask]).astype("uint8")- proc1.stdin.write(frame.tostring())+ proc1.stdin.write(frame.tobytes())except IOError as err: