python-lottie  0.7.0+dev66cafb9
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.objects.assets.Image Class Reference

External image. More...

Inheritance diagram for lottie.objects.assets.Image:
[legend]
Collaboration diagram for lottie.objects.assets.Image:
[legend]

Public Member Functions

def __init__ (self, id="")
 
def load (self, file, format=None)
 
def embedded (cls, image, format=None)
 Create an object from an image file. More...
 
def linked (cls, filename)
 
- Public Member Functions inherited from lottie.objects.assets.FileAsset
def __init__ (self)
 
def data (self)
 
- Public Member Functions inherited from lottie.objects.base.LottieObject
def to_dict (self)
 Serializes into a JSON object fit for the Lottie format. More...
 
def load (cls, lottiedict)
 Loads from a JSON object. More...
 
def find (self, search, propname="name")
 Recursively searches for child objects with a matching property. More...
 
def find_all (self, type, predicate=None, include_self=True)
 Find all child objects that match a predicate. More...
 
def clone (self)
 Returns a copy of the object. More...
 
def clone_into (self, other)
 
def __str__ (self)
 
- Public Member Functions inherited from lottie.objects.base.LottieObjectMeta
def __new__ (cls, name, bases, attr)
 

Static Public Member Functions

def guess_mime (file)
 

Public Attributes

 height
 Image Height. More...
 
 width
 Image Width. More...
 
 id
 Image ID. More...
 
 type
 If "seq", marks it as part of an image sequence. More...
 
 path
 
 file_name
 
 is_embedded
 
- Public Attributes inherited from lottie.objects.assets.FileAsset
 path
 Path to the directory containing a file. More...
 
 file_name
 Filename or data url. More...
 
 is_embedded
 Whether the file is embedded. More...
 
 id
 
- Public Attributes inherited from lottie.objects.helpers.VisualObject
 name
 
 match_name
 

Detailed Description

External image.

See also
http://docs.aenhancers.com/sources/filesource/
Lottie JSON
Lottie name Type Description Attribute
nm str   name
mn str   match_name
id str Image ID.   id
u str   path
p str   file_name
e 0-1 int   is_embedded
h float Image Height.   height
w float Image Width.   width
t str If "seq", marks it as part of an image sequence.   type

Definition at line 83 of file assets.py.

Constructor & Destructor Documentation

◆ __init__()

def lottie.objects.assets.Image.__init__ (   self,
  id = "" 
)

Definition at line 105 of file assets.py.

Member Function Documentation

◆ embedded()

def lottie.objects.assets.Image.embedded (   cls,
  image,
  format = None 
)

Create an object from an image file.

Definition at line 145 of file assets.py.

◆ guess_mime()

def lottie.objects.assets.Image.guess_mime (   file)
static

Definition at line 96 of file assets.py.

◆ linked()

def lottie.objects.assets.Image.linked (   cls,
  filename 
)

Definition at line 153 of file assets.py.

◆ load()

def lottie.objects.assets.Image.load (   self,
  file,
  format = None 
)
Parameters
fileFilename, file object, or PIL.Image.Image to load
formatFormat to store the image data as

Definition at line 117 of file assets.py.

Member Data Documentation

◆ file_name

lottie.objects.assets.Image.file_name

Definition at line 137 of file assets.py.

◆ height

lottie.objects.assets.Image.height

Image Height.

Definition at line 109 of file assets.py.

◆ id

lottie.objects.assets.Image.id

Image ID.

Definition at line 113 of file assets.py.

◆ is_embedded

lottie.objects.assets.Image.is_embedded

Definition at line 141 of file assets.py.

◆ path

lottie.objects.assets.Image.path

Definition at line 131 of file assets.py.

◆ type

lottie.objects.assets.Image.type

If "seq", marks it as part of an image sequence.

Definition at line 115 of file assets.py.

◆ width

lottie.objects.assets.Image.width

Image Width.

Definition at line 111 of file assets.py.


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