Python can allow us to create a gif using some images, which is very easy. In this tutorial, we will use python moviepy library to create a gif. You can learn how to do.
from moviepy.editor import ImageSequenceClip
images =  #load 10 images for i in range(10): images.append('E:\\video-images\\'+str(i+1)+'.jpg')
In this example, we will use 10 jpg images to create a gif image. You also can travers images from a directory or capture images from a video.
Here is an example:
Create an ImageSequenceClip object to create gif
clip = ImageSequenceClip(images,fps=1)
where fps =1 express gif will load an image per sencond, you also can change its value by yourself.
Save to gif image
Run this script, you will find:
Then gif is created successfully.