Telegram skin recolor
Telegram can recolor some animations to different skin colors

but it's telegram's rlottie only feature https://github.com/TelegramMessenger/rlottie/commit/67f103bc8b625f2a4a9e94f1d8c7bd84c5a08d1d
If I understand correctly I need to implement capi in optional file and add feature to use it
No, the C API isn't going to help you. The changes you linked to are only made to the C++ interface, the C interface is just a binding to that.
Looks like bindgen generate binding to C++: https://rust-lang.github.io/rust-bindgen/cpp.html
maybe I can make hpp wrapper and add load_from_data_tg function
Yeah I see basically 3 options:
- try to use bindgen with C++, or the cxx crate to bridge to C++ directly, which is likely going to be very painful
- write some C wrapper ourselves
- try to apply the color replacement as post-processing in Rust
Feel free to try these out and/or suggest other options that I might've missed. The last one might be favourable as it would work with either version of rlottie.
I made first working version
https://github.com/yuraiz/rlottie-rs/tree/fitz-recolor
It looks like this should work with Samsung version of rlottie too (https://github.com/Samsung/rlottie/commit/3be663ef40122aca6c748e91f060e6b15637bdb5), but with a different api.
Telegram's fitzModifier gets replacement colors from json, and recolors skin only when Samsung's colorFilter will be applied to all colors
Color filter can be useful for conversion, but I don't want to use it for skin recolor
I can make feature 'v2' and add color filter later, but 'v2' and 'tg' features will be exclusive
Telegram used to apply skin tone to faces
