add the function of making gif from imgs.