Struct lottieconv::Builder
source · pub struct Builder { /* private fields */ }
Expand description
This type is used to build a Converter
. It is created using
Converter::new()
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn gif<W: Write>(
self,
bg: Rgba,
out: W
) -> Result<Converter<Convert2Gif<W>>, EncodingError>
pub fn gif<W: Write>(
self,
bg: Rgba,
out: W
) -> Result<Converter<Convert2Gif<W>>, EncodingError>
Create a converter for lottie animation to a GIF file.
This is a lossy operation. GIF does not support full alpha channel. Even if you enable the alpha flag for background color, the rgb value is required. This is because semi-transparent pixels will be converted to non-transparent pixels, adding onto the background color. Only fully transparent pixels will remain transparent.