Skip to content

Commit cb2ee07

Browse files
committed
use etcpack instead of basisu
1 parent c58fdf7 commit cb2ee07

2 files changed

Lines changed: 2 additions & 16 deletions

File tree

‎UnityPy/export/Texture2DConverter.py‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,25 +81,11 @@ def pvrtc(image_data: bytes, width: int, height: int, fmt: int):
8181
image_data = tex2img.decompress_pvrtc(image_data, width, height, False)
8282
else:
8383
image_data = tex2img.basisu_decompress(image_data, width, height, fmt)
84-
8584
return Image.frombytes("RGBA", (width, height), image_data, "raw", "RGBA")
8685

8786

88-
ETCPACK_TO_BASISU = {
89-
0: 0,
90-
1: 2,
91-
3: 3
92-
}
93-
94-
9587
def etc(image_data: bytes, width: int, height: int, fmt: int):
96-
# we're going to use basisu for this instead of ETCPACK to avoid the memory leak issue
97-
if fmt == 4:
98-
# basisu has no explicit support for this mode
99-
image_data = tex2img.decompress_etc(image_data, width, height, fmt)
100-
else:
101-
image_data = tex2img.basisu_decompress(image_data, width, height, ETCPACK_TO_BASISU[fmt])
102-
88+
image_data = tex2img.decompress_etc(image_data, width, height, fmt)
10389
return Image.frombytes("RGBA", (width, height), image_data, "raw", "RGBA")
10490

10591

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
setuptools.setup(
77
name="UnityPy",
88
packages=setuptools.find_packages(),
9-
version="1.2.6.6",
9+
version="1.2.6.8",
1010
author="K0lb3",
1111
description="A pythonic port of AssetStudio by Perfare",
1212
long_description=long_description,

0 commit comments

Comments
 (0)