Gif animation optimazation and compression