python-lottie  0.6.11+deved4e6c7
A framework to work with lottie files and telegram animated stickers (tgs)
svg.py
Go to the documentation of this file.
1 from .base import importer
2 from ..parsers.baseporter import ExtraOption
3 from ..parsers.svg import parse_svg_file
4 from ..parsers.tgs import open_maybe_gzipped
5 
6 
7 @importer("SVG", ["svg", "svgz"], [ ExtraOption( "layer_frames", type=int, default=0, help="If greater than 0, treats every layer in the SVG as a different animation frame,\n" "greater values increase the time each frames lasts for."),
8  ExtraOption("n_frames", type=int, default=60),
9  ExtraOption("framerate", type=int, default=60),
10 ])
11 def import_svg(file, *a, **kw):
12  return open_maybe_gzipped(file, lambda svgfile: parse_svg_file(svgfile, *a, **kw))
13 
def import_svg(file, *a, **kw)
Definition: svg.py:11
def parse_svg_file(file, layer_frames=0, *args, **kwargs)
Definition: importer.py:1311
def open_maybe_gzipped(file, on_open)
Definition: tgs.py:14