python-lottie  0.6.11+devcecd248
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"], [
9  "layer_frames", type=int, default=0,
10  help="If greater than 0, treats every layer in the SVG as a different animation frame,\n"
11  "greater values increase the time each frames lasts for."),
12  ExtraOption("n_frames", type=int, default=60),
13  ExtraOption("framerate", type=int, default=60),
14 ])
15 def import_svg(file, *a, **kw):
16  return open_maybe_gzipped(file, lambda svgfile: parse_svg_file(svgfile, *a, **kw))
lottie.parsers.baseporter.ExtraOption
Definition: baseporter.py:32
lottie.parsers.tgs.open_maybe_gzipped
def open_maybe_gzipped(file, on_open)
Definition: tgs.py:14
lottie.parsers.svg.importer.parse_svg_file
def parse_svg_file(file, layer_frames=0, *args, **kwargs)
Definition: importer.py:1310
lottie.importers.svg.import_svg
def import_svg(file, *a, **kw)
Definition: svg.py:15
lottie.importers.base.importer
importer
Definition: base.py:21