Bases: collada.DaeObject
Class containing data coming from a <image> tag.
Basically is just the path to the file, but we give an extended functionality if PIL is available. You can in that case get the image object or numpy arrays in both int and float format. We named it CImage to avoid confusion with PIL’s Image class.
Create an image object.
Parameters: |
|
---|
Methods
__init__(id, path[, collada, xmlnode]) | Create an image object. |
load(collada, localspace, node) | |
save() | Saves the image back to xmlnode. |
Attributes
data | |
floatarray | |
pilimage | |
uintarray |
The unique string identifier for the image
Path relative to the collada document where the image is located
ElementTree representation of the image.
Raw binary image file data if the file is readable. If aux_file_loader was passed to collada.Collada.__init__(), this function will be called to retrieve the data. Otherwise, if the file came from the local disk, the path will be interpreted from the local file system. If the file was a zip archive, the archive will be searched.
PIL Image object if PIL is available and the file is readable.
Numpy array (height, width, nchannels) in integer format.
Numpy float array (height, width, nchannels) with the image data normalized to 1.0.