🧱 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'#
- class OlDecoder(file, options=None)[source]#
Bases:
BaseOlDecoder[DefaultTexture]
Exceptions#
- exception OlDecodingError(file)[source]#
Bases:
FileError,ParsingErrorBase exception for OL texture related errors.
- prefix#
- exception OlFormatUnsupported(file, format)[source]#
Bases:
OlDecodingError,UnsupportedErrorRaised when texture contains unsupported format.
-
format:
bytes#
-
format:
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