PHP class to create an animated GIF from multiple images