Trimatix / AEPi

Read and write Abyss Engine Image (AEI) files from python, for Galaxy on Fire 2
Apache License 2.0
2 stars 0 forks source link

Reading Cubemaps #54

Open BaalNetbek opened 4 months ago

BaalNetbek commented 4 months ago

I'm having trouble reading cubemaps from GoF2FHD as they seem to just contain invalid bboxes thus can't be loaded using standard AEI.read()

    aei = AEI.read(image_path)
          ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\AEPi\image\AEI.py", line 359, in read
    aei.addTexture(tex)
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\AEPi\image\AEI.py", line 190, in addTexture
    existingTexture = self._findTextureByBox(texture)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\AEPi\image\AEI.py", line 130, in _findTextureByBox
    x, y, width, height = self._validateBoundingBox(val1, y, width, height)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\AEPi\image\AEI.py", line 124, in _validateBoundingBox
    raise ValueError("The bounding box falls out of bounds of the AEI")
BaalNetbek commented 4 months ago

cubemaps.zip Three example cubemaps.