Name: decrunch
Owner: HearthSim
Description: Python wrapper around Crunch DXTc decompressor
Created: 2017-03-05 22:19:37.0
Updated: 2018-04-16 02:12:29.0
Pushed: 2017-11-03 21:33:35.0
Homepage: https://hearthsim.info
Size: 87
Language: C++
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
decrunch is a Python wrapper around crunch's decompressor.
pip install decrunch
pip install Cython
, then ./setup.py install
rt decrunch
open("example.crn", "rb") as f:
buf = f.read()
decrunch.File(buf)
info = fi.info()
level in range(tex_info["levels"]):
print("Level info %i: %r" % (level, fi.info(level)))
open("out.bc1", "wb") as f:
f.write(fi.decode_level(0))
Further image decoding requires a DXTn decompressor, such as the one that
can be found in Pillow as bcn
.