ed-asriyan / lottie-converter

Converts Lottie Animations (.json / .lottie) and Telegram stickers (*.tgs) to GIF / PNG / APNG / WEBP / WEBM
https://t.me/tgtowabot
MIT License
795 stars 72 forks source link

it make same copy of tgs sticker to convert to gifs in folder #21

Closed SauravDharwadkar closed 3 years ago

SauravDharwadkar commented 4 years ago

i try to convert folder using master-cpp it coverts with respective names as tgs in folder . but all converted gifs are same copy of first tgs file .

i dig a little i think problem with render.cpp / render function

auto player = rlottie::Animation::loadFromData(lottieData, "");

player variable doesnt change for rest of conversion , but output variable changes an give proper output filename player variable get frame and do conversion stuff i thinks problem lies in player / rlottie

ed-asriyan commented 3 years ago

@SauravDharwadkar, thanks for the hint! The problem really was related with loadFromData function call. rlottie lib uses caches for optimisations as I understand. The second argument, representing the "cache key", was constant, so the resulting images were the same.