You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the release version of Pillow, the active development branch of PIL,
with images2gif.py.
There are three issues here.
First, please see
https://code.google.com/p/visvis/source/browse/vvmovie/images2gif.py#413
> palette = getheader(im)[1]
In personal communication with wiredfool from the PIL, we looked through the
PIL code and established that the palette is in fact in getheader(im)[0][-1]
Second, the fallback palette is, from
https://code.google.com/p/visvis/source/browse/vvmovie/images2gif.py#415
> palette = PIL.ImagePalette.ImageColor
But this is a module, and not appropriate for a color palette!
The correct solution would be to use PIL.Image.convert(mode='P') to convert the
image to palette mode. My client code converts everything to mode='P' already
so I didn't test this.
Finally, there are .encode('utf-8') calls scattered around the code. These
won't work - the data given to you by PIL is already in bytes format. Just
deleting them seems to be effective.
With those changes, I was able to get this routine to write nice-looking
animated GIFs!
Original issue reported on code.google.com by tom.ritc...@gmail.com on 24 Feb 2014 at 11:10
The text was updated successfully, but these errors were encountered:
@vic1309 what images2gif is that? The one from visvis or the one linked above? Have you tried imageio yet. It's much more stable since I mentioned it earlier in this thread.
Original issue reported on code.google.com by
tom.ritc...@gmail.com
on 24 Feb 2014 at 11:10The text was updated successfully, but these errors were encountered: