Upscale Gif File with Nearest Neighbor Interpolation (Integer Multiple) on Windows (Gifsicle)

I want to upscale a .gif file with nearest neighbor interpolation on Windows from commandline (I am scaling by integer multiples). I have tried gifsicle 1.92 but for some reason it doesn't work correctly and outputs a corrupted file (it cannot be viewed). This is the input file and the command I'm using:

input gif

./gifsicle.exe --resize 256x174 --resize-method sample abomasnow.gif > out.gif

I get a 497 KB output file that cannot be viewed in any gif viewer. What am I doing wrong? I'm also open to using ffmpeg or other tools if it's not possible with gifsicle.


ffmpeg -i input.gif -vf "scale=256:-1:flags=neighbor,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif
  • Adapted from How do I convert a video to GIF using ffmpeg, with reasonable quality?
  • Also see scale filter documentation.