Python PIL: how to write PNG image to string,"image.save(output, format='GIF')"