tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Is there a way to get the animated stickers as a GIF file instead of the TGS file? #2274

Closed atiyka closed 1 year ago

atiyka commented 1 year ago

Unfortunatelly I have lot's of troubles with the Lottie library in my project (WPF+XamlIslands). Also tried to convert the animated JSON file to a GIF, but I haven't found any way to do this in .NET. I could not even extract the frames from that json file.

It would be great if I could get the animations as GIF or WEBP files from the tdlib.

levlam commented 1 year ago

Lottie files can be rendered only by a lottie library and TDLib doesn't bundle one. What issues do you have with https://github.com/TelegramMessenger/rlottie? It can be used with a few lines of C++ code.

atiyka commented 1 year ago

Ok, thank you. The project is developed in C# .NET. I have issues with the LottieUwp (anyway it's marked as deprecated) and with the Lottie-Windows. As I know I can not use the rlottie C++ lib in a .NET project, or can I?

And there is no other option outside of the lottie to render the animations?

levlam commented 1 year ago

You can also see, how rlottie is used in Unigram.

atiyka commented 1 year ago

Great, I could render now with RLottie! Thank you so much!