Open edap opened 4 years ago
I have the same error. All requirement and gifsicle are installed
The same and how to solve it??
@edap @RtYkk @ExistentialMisery you have to modify your gif for example via https://ezgif.com/optimize with "Optimization method: Optimize transparency"
Didn't help. Mine is just a simple gif:
This file has the transparent color index set to 255, despite the palette contains only 4 colors (among which only 2 are used, thus it gets even worse after optimizations), hence the error. It can be circumvented by setting some correct index as transparent:
@bq:17:01:42:/tmp/dl$ gifsicle -t 0 185141255-111b401c-741e-4b9b-8dbd-a9117e16c3ec.gif > 185141255-111b401c-741e-4b9b-8dbd-a9117e16c3ec-2.gif
@bq:17:01:50:/tmp/dl$ python3 /data/progs/python/giftolottie/read.py 185141255-111b401c-741e-4b9b-8dbd-a9117e16c3ec-2.gif /tmp/hi.tgs
@bq:17:02:47:/tmp/dl$ ls -l /tmp/hi.tgs
-rw-r--r-- 1 bodqhrohro bodqhrohro 16796 авг 17 17:02 /tmp/hi.tgs
@bq:17:03:22:/tmp/dl$
or forcefully extending the palette so it always has 256 colors.
Still it should be handled better by gif2numpy (AFAIR, I already had made some ugly hacks to make it support transparency at all).
And I remind there's generally no need in this tool anymore as Telegram now supports WebM stickers natively, unless you want to add new stickers to an existing animated pack, or use the Lottie output beyond Telegram :P
@bodqhrohro Yeah, what I was looking for is using Telegram stickers in Lottie. This is my solution for that: https://stackoverflow.com/a/71830351/421467
The full-fledged Lottie format has much more possibilities than the restricted TGS, including an ability to embed raster frames, so there's no need in such a quirky tool for that.