Samsung / rlottie

A platform independent standalone library that plays Lottie Animation.
Other
1.18k stars 225 forks source link

bgColor's transparency not work #495

Open soxunyi opened 3 years ago

soxunyi commented 3 years ago

Run lottie2gif example.json 500x500 0x00ffffff in ternimal, and the background of example.json.gif is white, and the fully transparent is not work. The bgColor is not supported alpha value?

Commandtechno commented 3 years ago

Any update on this? I can't figure out how to render lotties with a transparent background

smohantty commented 2 years ago

@soxunyi , lottie2gif is just an example app to quickly test the rendering without any UI framework. not sure whats the usecase. there maybe better tools in lottiefiles to a gif. @hermet , I think you have added the background color support to lottie2gif. is it possible to support transparent background ?

IdanRot commented 2 years ago

Any updates here?

hermet commented 2 years ago

Hi, basically gif doesn't support the alpha channel. gif89a format might support transparent but current gif builder in lottie2gif doesn't support it. Sorry for that.

IdanRot commented 2 years ago

Is there an option for getting transparent pngs for every frame? Thanks for your reply :-)

XieJiSS commented 1 year ago

@IdanRot I think your requirement can be done by slightly modifying https://github.com/XieJiSS/rlottie/commit/6f2d8b7519f63db1458dbcc06d88ac7f4624df42, and the glitched output caused by frame composing could be fixed by ImageMagick convert -set dispose previous input.gif output.gif.