avifilelib.rle module¶
Decoders for Microsoft RLE formats.
This package provides decoders capable of decoding frames encoded using the Microsoft RLE4 and RLE8 formats.
-
class
avifilelib.rle.RLE4Decoder(width, height, colors)¶ Bases:
avifilelib.rle.RLEDecoderBaseDecoder for RLE4 compression.
This class implements a decoder for the RLE4 compression algorithm.
Parameters: -
COMPRESSION= 2¶
-
-
class
avifilelib.rle.RLE8Decoder(width, height, colors)¶ Bases:
avifilelib.rle.RLEDecoderBaseDecoder for RLE8 compression.
This class implements a decoder for the RLE8 compression algorithm.
Parameters: -
COMPRESSION= 1¶
-
-
class
avifilelib.rle.RLEDecoderBase(width, height, colors)¶ Bases:
avifilelib.decoder.DecoderBaseBase class for RLE formats.
This class provides the foundation for run-length encoding decoders. Both the RLE4 and RLE8 formats require color paletes, and therefore this class accepts a color palate/table as an argument.
Parameters: -
COMPRESSION= (<BI_COMPRESSION.BI_RLE4: 2>, <BI_COMPRESSION.BI_RLE8: 1>)¶
-
colors¶ Get the color table.
-
classmethod
for_avi_stream(stream_definition)¶ Attempts to find a decoder implementation for a stream.
Subclasses of
RLEDecoderBaseare selected by matching the value of COMPRESSION.Returns: A subclass of RLEDecoderBase.Return type: object
-