viam.media.utils.pil.viam_rgba_plugin
Classes
Python implementation of a format encoder. Override this class and |
|
Base class for image file format handlers. |
|
Python implementation of a format decoder. Override this class and |
Module Contents
- class viam.media.utils.pil.viam_rgba_plugin.RGBAEncoder(mode, *args)[source]
Bases:
PIL.ImageFile.PyEncoder
Python implementation of a format encoder. Override this class and add the decoding logic in the
encode()
method.See Writing Your Own File Codec in Python
- ENCODER_NAME
- class viam.media.utils.pil.viam_rgba_plugin.RGBAImage(fp=None, filename=None)[source]
Bases:
PIL.ImageFile.ImageFile
Base class for image file format handlers.
- format: ClassVar[str]
- format_description = "Viam's Raw RGBA Format"
- close() None
Closes the file pointer, if possible.
This operation will destroy the image core and release its memory. The image data will be unusable afterward.
This function is required to close images that have multiple frames or have not had their file read and closed by the
load()
method. See file-handling for more information.