ws-tex: image/ktx (KTX1 + KTX2 read: BCn / ETC2 / EAC / uncompressed, mips, cube, arrays, 3D, Zstd / ZLIB; Basis UNSUPPORTED; KTX2 write)

KTX2 writer: rgba8 (UNORM / SRGB), rgba16, rgba16f / rgba32f with a full DFD, mips, cube / array frames, ZLIB.
Tested against ktx create / deflate / extract, toktx, nvcompress -ktx and hand-written KTX1 (big-endian, packed,
row padding, T=u); our files pass ktx validate.
This commit is contained in:
4DBug committed 2026-10-31 14:30:30 -05:00
1 parent e59f5409a7
commit ef2cd93c88
7 files changed
+1154

No files matched your search

+3
View File
@@ -99,6 +99,9 @@ def rgba_from(mode, raw):
if mode == "L":
for v in raw:
out += bytes((v, v, v, 255))
elif mode == "LA":
for i in range(0, len(raw), 2):
out += bytes((raw[i], raw[i], raw[i], raw[i + 1]))
elif mode == "RGB":
for i in range(0, len(raw), 3):
out += raw[i:i + 3] + b"\xff"