Looking for an easy way (i.e. short code + minimum library dependency) to convert a 4D numpy array
(Time x Width x Height x Channel) into a gif
file (i.e. getting a BytesIO
) without saving it on disk.
All the libraries that I looked at (e.g. moviepy
and PIL
) save the frames on disk only and their API does not allow for a custom Stream
. I have a diskless setup and need to get the bytes without saving them.