Closed yugaocheng closed 1 year ago
Let me clarify: If you replace sample.json with your own lottie file, you get an empty png as result? Your lottie file somehow contains raster assets?
I have never heard of lottie files that contain raster assets. Can you send me the file you were using?
Edit: Are you referring to this? https://lottiefiles.github.io/lottie-docs/assets/
yeah, Maybe my expression is not particularly accurate,but the raster image can be inserted as reference image as the fields ‘u‘ and ’p‘ described. well, how can i send u my own sample file?
I think you can upload it here by drag and drop. If that does not work, try to change the extension to txt, or upload to cloud drive and share
I see no problem
from rlottie_python import LottieAnimation
json_file = 'data.json'
with LottieAnimation.from_file(path=json_file) as anim:
anim.save_animation('test1.apng')
anim.save_animation('test2.gif')
anim.save_animation('test3.webp')
Maybe it's because the circles are white, and the transparent background is displayed as white on your side, or you accidentally cause the transparent background to become white background (e.g. Are you using 'RGBA' mode for pillow)? Or perhaps you have selected an empty frame to convert to png?
btw You may take a look at the lottie file here: http://rlottie.com/
Show me your code? What OS? Are you running the latest version of rlottie-python?
Likely not a problem with this repo. I am closing this for now. If you still encounter difficulties, please re-open issue with more information.
i can get empty png files from my owner data when run rlottie-python/example/example.py
but i got right result in sample.json. The different between them is that i use raster image in assets.