PAA utilities for Pillow¶
Warning
This module depends on the Pillow
package. It must be installed in the environment, otherwise a
ModuleNotFoundError exception will be thrown.
Install the package manually, or install ArmaIO with the pillow
extra:
pip install armaio[pillow]
The Pillow package is a widely used image
manipulation library for Python. It provides support for a wide range of
image formats out of the box. The armaio.paa.pillow module
provides utilities to deal with Arma 3 PAA files.
from PIL import Image
from armaio.paa.pillow import open_paa_image
with open_paa_image("texture_co.paa") as im:
im.show()
Functions¶
- armaio.paa.pillow.open_paa_image(path: str | PathLike[str] | bytes | PathLike[bytes], mipmap: int = 0) Image¶
Convenience function that opens a PAA as a Pillow Image object.
- Parameters:
path (StrOrBytesPath) – Path to PAA file
mipmap (int, optional) – Index of mipmap to open, defaults to 0
- Returns:
Decoded image
- Return type: