GifCat icon indicating copy to clipboard operation
GifCat copied to clipboard

Set allowed colors in palette?

Open jessemillar opened this issue 6 years ago • 2 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?

jessemillar avatar Nov 19 '18 21:11 jessemillar

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.

WetDesertRock avatar Nov 20 '18 00:11 WetDesertRock

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

jessemillar avatar Nov 20 '18 14:11 jessemillar

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.

WetDesertRock avatar Oct 27 '22 04:10 WetDesertRock