There are some codes to translate images to gif.