python-lottie  0.6.11+devc144cca
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.parsers.raster.TraceOptions Class Reference

Public Member Functions

def __init__ (self, color_mode=QuantizationMode.Nearest, palette_algorithm=OctreePalette(), tolerance=100, stroke_width=1, smoothness=0.75, min_area=16)
 
def smoothness (self)
 
def smoothness (self, value)
 
def min_area (self)
 
def min_area (self, value)
 
def quantize (self, image, n_colors)
 Returns a list of RGB values. More...
 
def trace (self, image, codebook)
 Returns a list of tuple [color, data] where for each color in codebook data is a list of bezier. More...
 

Public Attributes

 trace_options
 
 palette_algorithm
 
 color_mode
 
 tolerance
 
 stroke_width
 
 min_area
 
 smoothness
 

Detailed Description

Definition at line 47 of file raster.py.

Constructor & Destructor Documentation

◆ __init__()

def lottie.parsers.raster.TraceOptions.__init__ (   self,
  color_mode = QuantizationMode.Nearest,
  palette_algorithm = OctreePalette(),
  tolerance = 100,
  stroke_width = 1,
  smoothness = 0.75,
  min_area = 16 
)

Definition at line 48 of file raster.py.

Member Function Documentation

◆ min_area() [1/2]

def lottie.parsers.raster.TraceOptions.min_area (   self)

Definition at line 74 of file raster.py.

◆ min_area() [2/2]

def lottie.parsers.raster.TraceOptions.min_area (   self,
  value 
)

Definition at line 78 of file raster.py.

◆ quantize()

def lottie.parsers.raster.TraceOptions.quantize (   self,
  image,
  n_colors 
)

Returns a list of RGB values.

Definition at line 81 of file raster.py.

◆ smoothness() [1/2]

def lottie.parsers.raster.TraceOptions.smoothness (   self)

Definition at line 66 of file raster.py.

◆ smoothness() [2/2]

def lottie.parsers.raster.TraceOptions.smoothness (   self,
  value 
)

Definition at line 70 of file raster.py.

◆ trace()

def lottie.parsers.raster.TraceOptions.trace (   self,
  image,
  codebook 
)

Returns a list of tuple [color, data] where for each color in codebook data is a list of bezier.

You can get codebook from quantize()

Definition at line 87 of file raster.py.

Member Data Documentation

◆ color_mode

lottie.parsers.raster.TraceOptions.color_mode

Definition at line 51 of file raster.py.

◆ min_area

lottie.parsers.raster.TraceOptions.min_area

Definition at line 54 of file raster.py.

◆ palette_algorithm

lottie.parsers.raster.TraceOptions.palette_algorithm

Definition at line 50 of file raster.py.

◆ smoothness

lottie.parsers.raster.TraceOptions.smoothness

Definition at line 55 of file raster.py.

◆ stroke_width

lottie.parsers.raster.TraceOptions.stroke_width

Definition at line 53 of file raster.py.

◆ tolerance

lottie.parsers.raster.TraceOptions.tolerance

Definition at line 52 of file raster.py.

◆ trace_options

lottie.parsers.raster.TraceOptions.trace_options

Definition at line 49 of file raster.py.


The documentation for this class was generated from the following file: