sot-tech / LottieConverter

Simple, dummy lottie converter
BSD 3-Clause "New" or "Revised" License
27 stars 4 forks source link

bug: gif has black background #2

Closed LuckyTurtleDev closed 3 years ago

LuckyTurtleDev commented 3 years ago

If I convert a animated lottie file to a gif, I get a gif with a black background. But if I does convert this to an png it is still transparent.

I have test it with the telegram duck tickerpack: https://t.me/addstickers/UtyaDuck

sot-tech commented 3 years ago

Hello.

For now, it broken by design (see option parameter in README). Unfortunately, I did not fully understand how gif.h works with Alpha, it quite creepy (see example below). Perhaps a little later I will do further experiments.

out

P.S. GIF does not support native alpha channel and setting one color as transparent is rudimentary dirty hack, IMAO.

LuckyTurtleDev commented 3 years ago

Hi, have found a very new alternative program, with does support transparent and does also use rlottie. https://github.com/msrd0/rlottie-rs/commit/cb90e5206b170e91d1a6d720051c1242edcf82ce You may would like to take a look at the implementation. I have start using this now, but thanks for your efforts.

sot-tech commented 3 years ago

Happy for you!

Maybe rust is better solution in your case. There is no so many good and lightweight GIF encoders in c/c++.