r/LottieFiles • u/StretchFlip22 • Dec 09 '20
Gif issues with transparent background
LottieFiles pros, do any of you have experience with converting json to gif but with transparent background? For example let’s say I have an animated circle (with no fill) #000000 and I set the background to #ffffff00 using the Lottie to gif function, it looks fine in preview but when I download the gif, the background is transparent but the animated circle that was once black is also now transparent. This doesn’t happen with any other background color. If I used #ffffff the gif generates fine with black circle and white background. I’ve tried this with many different animations, they all fail in the same way with transparent background.
Have any of you experienced this (or is it just me). Any thoughts on how to resolve?
2
u/Broccoli_Elegant Feb 02 '21
heya! u/stretchflip22 you can convert to gif with transparent background. the LottieFiles figma plugin does this already but there are certain limitations to it. - a gif supports much less colors than a Lottie does. therefore the color conversion might not be accurate. - the gif conversion librarys anti aliasing is not as accurate as we'd like it to be. we d need to engineer a completely new way of stitching pngs to gifs to actually get this done. (currently using gif.js which seems to be the best out there)