I've the following code about the imageio Python library, which loads 2 images I have from the current folder, replaces all the colors > 200 with 0 (making it darker), and then printing the result to a new .gif image:
import imageio
import numpy as np
im = 'image1.png'
im2 = 'image2.png'
images = []
images.append(imageio.imread(im))
images.append(imageio.imread(im2))
imageio.mimsave('surface1.gif', images, duration = 0.5)
im4 = imageio.imread('surface1.gif')
im4[im4 > 200] = 0
imageio.imwrite('movie.gif', im4, format='gif')
The problem is that the generated image contains only 1 frame, only 1 image, not both of the images which I already "merged" in a surface1.gif. Why is that?