WetDesertRock / GifCat

A simple module for saving gifs from LOVE 0.11.x.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set allowed colors in palette?

jessemillar opened this issue · comments

My game has a defined color palette. Is there any way to pass a list of the colors to GifCat so my GIFs have clean colors instead of glitchy-looking dithering?

Yes, by default the writer will use all of the colors in the first frame as its palette (or something similar). Because of this it provides a way to statically set the palette. You can try to increate the palette size when creating the gif to see if this resolves some issues (see gifcat.newGif()). Beyond that I do think code changes (in the lua API) are needed to support what you are describing.

I tried setting the palette size to 256 and unfortunately it didn't seem to make any difference.

I believe GIFs are limited to 255 colors. I've added in a feature (on by default) to use the local palette of jo_gif, which generates a new palette for each frame. While this still has ugly dithering, it can fix some very ugly dithering.