ImageOptim / gifski

GIF encoder based on libimagequant (pngquant). Squeezes maximum possible quality from the awful GIF format.
https://gif.ski
Other
4.79k stars 143 forks source link

Ability to create gifs from GIF files #184

Closed indextwo closed 3 years ago

indextwo commented 3 years ago

gifski is amazing, and I've used it a handful of times to make some of my animations into lovely GIFs for Twitter.

But right now I've got a folder with several hundred thousand images, all single frames, which are GIF images themselves. I figured I could just throw them at gifski and it would do its thing, but it only accepts PNGs. Looking into converting them, and my best estimate is weeks to convert all the single frames into PNG files.

Is there any way to get gifski to use these GIFs as the frames to build an animation?

kornelski commented 3 years ago

Since individual GIF images are already limited to 256 colors, you don't need gifski for them. There's no color reduction step involved, the quality has already been lost. You can just merge them together as they are using a tool like gifsicle.

indextwo commented 3 years ago

Totally get that, but in actual fact every single gif is a single solid color. The idea being to have each frame with its own palette (the single solid color), but for the stitched-together gif to be made up of thousands of colors, one for each frame, animating through a cycle. Does that make sense?

kornelski commented 3 years ago

Yes. That doesn't require gifski, which is about squeezing more than 256 colors per frame down to 256 colors per frame. If you have 1 color per frame, you've already performed the reduction.

You just need to concatenate the GIF files. gifsicle and other tools do that easily.

indextwo commented 3 years ago

Oh, cool! So I don't need to worry about the overall GIF palette? I think I was just worried that an attempt to do that would lead to the overall GIF being reduced to 256 colors total. But if each frame retains its own palette, then 🙌🏻