Skip to content

Commit

Permalink
Merge pull request #45 from Trimatix/dev
Browse files Browse the repository at this point in the history
v0.8.3.1
  • Loading branch information
Trimatix authored May 8, 2024
2 parents 6e5b384 + 5db2660 commit c2eedde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/AEPi/codecs/Tex2ImgCodec.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
CompressionFormat.DXT1: 5,
CompressionFormat.DXT5: 6,
CompressionFormat.ETC1: 0,
CompressionFormat.ETC2: 3
CompressionFormat.ETC2: 2
}


Expand Down
9 changes: 4 additions & 5 deletions src/AEPi/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

FORMAT_PILLOW_MODES: Dict["CompressionFormat", str] = {}
FORMAT_BITCOUNTS: Dict["CompressionFormat", int] = {}
BGRA_FORMATS: Set["CompressionFormat"] = set()
BGR_FORMATS: Set["CompressionFormat"] = set()
MIPMAPPABLE_FORMATS: Set["CompressionFormat"] = set()
MASK_MIPMAPPED_FLAG = 0b00000010
MASK_FORMAT_ID = 0b11111101
Expand Down Expand Up @@ -72,7 +72,7 @@ def supportsMipmapping(self):

@property
def isBgra(self):
return self in BGRA_FORMATS
return self in BGR_FORMATS


FORMAT_PILLOW_MODES[CompressionFormat.Uncompressed] = "RGBA" # ?
Expand All @@ -86,7 +86,7 @@ def isBgra(self):
FORMAT_PILLOW_MODES[CompressionFormat.DXT3] = "RGBA"
FORMAT_PILLOW_MODES[CompressionFormat.DXT5] = "RGBA"
FORMAT_PILLOW_MODES[CompressionFormat.ETC1] = "RGB"
FORMAT_PILLOW_MODES[CompressionFormat.ETC2] = "RGBA"
FORMAT_PILLOW_MODES[CompressionFormat.ETC2] = "RGB"

FORMAT_BITCOUNTS[CompressionFormat.Uncompressed] = 8 # ?
FORMAT_BITCOUNTS[CompressionFormat.Uncompressed_UI] = 8 # ?
Expand All @@ -101,8 +101,7 @@ def isBgra(self):
FORMAT_BITCOUNTS[CompressionFormat.ETC1] = 4
FORMAT_BITCOUNTS[CompressionFormat.ETC2] = 8 # ?

BGRA_FORMATS.add(CompressionFormat.ETC1)
BGRA_FORMATS.add(CompressionFormat.ETC2)
BGR_FORMATS.add(CompressionFormat.ETC1)

MIPMAPPABLE_FORMATS.add(CompressionFormat.PVRTC12A)
MIPMAPPABLE_FORMATS.add(CompressionFormat.PVRTC14A)
Expand Down

1 comment on commit c2eedde

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/AEPi
   codec.py37392%22, 40, 119
   constants.py83792%38–44, 64, 70
   exceptions.py401172%18–19, 28–29, 39–40, 47, 54, 61, 68–69
src/AEPi/codecs
   EtcPakCodec.py291452%11–12, 22–30, 35–41
   RawCodec.py13285%15, 20
   Tex2ImgCodec.py19384%10–11, 28
   __init__.py8275%11–12
src/AEPi/image
   AEI.py2412789%121, 181, 185, 198, 225, 288, 294–297, 302, 326, 333, 341–342, 347–351, 382, 396–397, 436–437, 444–445, 488–489
   texture.py19289%29, 49
src/AEPi/lib
   binaryio.py24196%64
   imageOps.py9278%13–14
src/tests/image
   test_AEI.py199199%29
TOTAL8437591% 

Tests Skipped Failures Errors Time
43 0 💤 0 ❌ 0 🔥 0.327s ⏱️

Please sign in to comment.