lottie-image
keywords: lottie, png, apng, gif, lottie to gif, lottie to png, lottie to apng, svg, svg to image
Renders Lottie animations to image, GIF, APNG. Support only APNG and GIF for now, more formats will be added later.
Install
Install ffmpeg on MacOS
brew install ffmpeg
Or
Install ffmpeg on Linux(Ubuntu)
apt-get install ffmpeg
About ffmpeg : If you want to convert a image with transparent background. you need versions 4.2.1 and above.
Install pakage
npm install lottie-image --save
Usage
- Create Converter
var LottieConverter SvgConverter = ; var cvter = chromePath: 'replace with your own chrome path'// ffmpegPath: 'replace with your ffmpeg path' //; var svgcvter = chromePath : 'replace with your own chrome path';
- Use File Path
;async { await cvter}
- Use Json Object
;async { await cvter}
- svg to image
;async { await svgcvter}
- svg clip image
await svgcvter
output image: