🧱 OL#

Usage Example#
from scfile import formats

with formats.ol.OlDecoder("path/to/texture.ol") as ol:
  data = ol.decode()

with formats.dds.DdsEncoder(data) as dds:
  dds.encode().save("output.dds")

Decoder#

class BaseOlDecoder(file, options=None)[source]#

Bases: FileDecoder[TextureContent[TextureType]], OlFileIO, Generic[TextureType], ABC

format: FileFormat = 'ol'#
order: ByteOrder = '>'#
signature: Optional[bytes] = b'\n\x95#\xfd'#
to_dds()[source]#
parse()[source]#

Parse file content into self.data.

class OlDecoder(file, options=None)[source]#

Bases: BaseOlDecoder[DefaultTexture]

Exceptions#

exception OlDecodingError(file)[source]#

Bases: FileError, ParsingError

Base exception for OL texture related errors.

prefix#
exception OlFormatUnsupported(file, format)[source]#

Bases: OlDecodingError, UnsupportedError

Raised when texture contains unsupported format.

format: bytes#

IO#

Extensions for OL file format with custom struct-based I/O methods.

class OlFileIO(file, mode='r', closefd=True, opener=None)[source]#

Bases: StructFileIO