make FromImage work with gifs