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
When pillow writes a gif from our images (pngs), it needs to define a palette to use. The images are imported in RGBA format (so they pixels are given a transparency value), and it appears that devoting colors to allow transparency significantly uses up the palette. If I convert the images to RGB before inserting them into the gif, the palette is built with much higher resolution.
So my current solution removes transparency, which might be desired in some cases. Still, it's progress, and the fix is simple.
e.g. the component images of a 2D pcolormesh might have a smooth color gradient:
but the gif reduces the color size to be very segmented:
GIFs can only use a 256 color palette, but this is clearly more segmented than that. Maxing the palette_size kwarg to 256 does not fix this issue.
Proposing to add settings that allows for more color fidelity.
The text was updated successfully, but these errors were encountered: