a python wrapper for Perfare's Texture2DDecoder
Project description
texture2ddecoder
A python wrapper for Perfare's Texture2DDecoder
Some changes were made to the original code to make it cross-platform compatible.
Installation
pip install texture2ddecoder
or download/clone the git and use
python setup.py install
Example
import texture2ddecoder
# load sample data
data = open("astc_sample", "rb").read()
# decode data
width = 512
height = 512
block_width = block_height = 4
decoded_data= texture2ddecoder.decode_astc(data, width, height, block_width, block_height)
# load raw image data
dec_img = Image.frombytes("RGBA", (width, height), decoded_data, 'raw', ("BGRA"))
Functions
- All functions accept only arguments, no keywords.
- decode_pvrtc can cause segfaults on Mac OS
decode_bc1
decompresses bc1 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_bc3
decompresses bc3 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_pvrtc
decompresses pvrtc textures to BGRA
Params: bytes data, long width, long height, bool is2bpp Return: bytes
decode_etc1
decompresses etc1 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_etc2
decompresses etc2 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_etc2a1
decompresses etc2a1 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_etc2a8
decompresses etc2a8 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_eacr
decompresses eacr textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_eacr_signed
decompresses eacr_signed textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_eacrg
decompresses eacrg textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_eacrg_signed
decompresses eacrg_signed textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_bc4
decompresses bc4 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_bc5
decompresses bc5 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_bc6
decompresses bc6 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_bc7
decompresses bc7 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_atc_rgb4
decompresses atc_rgb4 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_atc_rgba8
decompresses atc_rgba8 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decode_astc
decompresses astc textures to BGRA
Params: bytes data, long width, long height, int block_width, int block_height Return: bytes
unpack_crunch
decompresses crunch textures to BGRA
Params: bytes data Return: bytes
unpack_unity_crunch
decompresses unity_crunch textures to BGRA
Params: bytes data Return: bytes
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for texture2ddecoder-1.0.1-py3.8-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 633640a9e8d525a30d3fac0ad2f2edfe29d63a1d73f976ba1d9461ea9ce47fc0 |
|
MD5 | ff5cd1c062de843f0b1efa7159c42400 |
|
BLAKE2b-256 | eb6aa1ad2c85cf13e4c78750391817707bb26277c55426f1e6d545e01d316272 |
Hashes for texture2ddecoder-1.0.1-py3.8-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45c77daf08903a4a8e13606231540ee868ec7e48f2802eda2a76e757025276e5 |
|
MD5 | 66bece2ed175771962195723d222b47b |
|
BLAKE2b-256 | 789ea66962d6f320e709dfc9aa312c070abeb09d5edda7808ecfd98d9b3784d3 |
Hashes for texture2ddecoder-1.0.1-py3.8-macosx-10.14-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3caf5bbcfae8f4bc99dd304197d5956b6b7c804e68991f4c20c7c26bc02a39a0 |
|
MD5 | dacc3d311dd723a1df9d16eaca9491c1 |
|
BLAKE2b-256 | 03290e2c46db98a4bc2986b6b8fccb6c5001abfebac1d75f05b6c029a55d2457 |
Hashes for texture2ddecoder-1.0.1-py3.7-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fa34b9dcc13f15b2edb5b2180882b5fd538e441e25ea7340a00d938960cd108 |
|
MD5 | c48673bcc4e0beaa89d33fd4a60bb067 |
|
BLAKE2b-256 | 3fe4d9479e410396d15c7fda29c77f0fbe904db0ff43ea04852f323e3668f2ac |
Hashes for texture2ddecoder-1.0.1-py3.7-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 282bff694031bdb3e81dd28cce2c3afc98a3706c515dd9c012c59a75663dda8d |
|
MD5 | 7caa7d32e991e605b6ea79d7ca1786f1 |
|
BLAKE2b-256 | 700b0d3e73328fabf9d39f211505109ed11430f42a2694a585e3a0d8e3fdb332 |
Hashes for texture2ddecoder-1.0.1-py3.7-macosx-10.14-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | a61abeb39b36387afea6e634fc2b534375d234fe7d95ff1ef9bbf32e1773e3e7 |
|
MD5 | 7922f4e2e075a174cbea762901b88dd6 |
|
BLAKE2b-256 | 2aa5eded5e354ddf6dc0e9647c1b28c946d4e72f390105234e371356e340c3b1 |
Hashes for texture2ddecoder-1.0.1-py3.6-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac40b5898e25cb0938a6c0e8502202269dfceca67e8ffaab8d3371bf5716e897 |
|
MD5 | 51b2787c7f2a2ae39efa2259b90a15fd |
|
BLAKE2b-256 | e16d13dbcb75a22232613f358b3bdadda38e276a70b0e9a0e9cfaac3ea91469b |
Hashes for texture2ddecoder-1.0.1-py3.6-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68d44df66c3fe0527a43dda4ed4b264443b0f6e1f8593761045fea03e26cd882 |
|
MD5 | 12e78772c95b0a271302dbcf65022e1b |
|
BLAKE2b-256 | df8ac297b483afba3584693b6148e8f6a7c8d6bf560e3966823bede654547112 |
Hashes for texture2ddecoder-1.0.1-py3.6-macosx-10.14-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11d136990030c411c7acbabf927487a71eb8f53b3e4f0b6ea673ed112a47a10a |
|
MD5 | 9756bcbf0982c4dfe7560bd10e976e3f |
|
BLAKE2b-256 | 5ea3d8cae00f396d0c1b5a52210facf0dc8dc57d182372f65b3ca407c9ef1f51 |
Hashes for texture2ddecoder-1.0.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 619d1b5efd60cc6dbc1c9cad714ed966df39e02d7cfb62f987ac41cd0d8f3c10 |
|
MD5 | 3d0342d87fd68da912d16760c208eaa0 |
|
BLAKE2b-256 | bb877e8abac53fdff6e129befe2b1cee94c052ba438b7fc6bc9a4b777e0d2663 |
Hashes for texture2ddecoder-1.0.1-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68274ffab9558fdc9d22f0700b04bf1097853ac9341004588d74a0bcf9bb6bc4 |
|
MD5 | cacff595eed8a0b3eaf2d4656d65c1c1 |
|
BLAKE2b-256 | 14196e4e19567823fa5ae9d157d0b516b09bbbb619c7208f514706540a2e9044 |
Hashes for texture2ddecoder-1.0.1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43c4ace20464d3f17e44521f491e347763df464f9c3c04837f55380f95fd32e2 |
|
MD5 | f3d5e4ade2236736c72adb64e78ded4d |
|
BLAKE2b-256 | 00e721a5e338839716306afdf061ee992903c9af6d7dad5442455769135a6e73 |
Hashes for texture2ddecoder-1.0.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf3ea2dd77b5532f810a0550cea242f5525db3aa6a43591c15795306de2611de |
|
MD5 | b1f51ce31002396492adf47ee005a4d1 |
|
BLAKE2b-256 | 81b20b9274a022ea9e2bc787030c7d902e8658ffb7b49ede920c12ca77c40505 |
Hashes for texture2ddecoder-1.0.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06c4d505aecb756177bfbe6f01961bbc189684cff7cb644f87bde47e303dd896 |
|
MD5 | a293cb281dfcee5a858bd5f51c7f58c9 |
|
BLAKE2b-256 | f813f1ff227cf768f69160089f07dcb812bd800b1b922882e3636b6796cbaf9a |
Hashes for texture2ddecoder-1.0.1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88a275440e4704673497eb1181d6c2a3fd25ab4300639f062d636f69d7e88157 |
|
MD5 | f76380d5c78e06f7532aec19dd3a19fa |
|
BLAKE2b-256 | 90089cbd1fe474b91c491f2ca03ce798765a5302b1dec006c025886a5850199a |
Hashes for texture2ddecoder-1.0.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b3f8c6c71dfb02d33d511ea018856524b35e639da6f3164577d295b8276a750 |
|
MD5 | a35374791f4890a3ccaacf2a1ec0c0d4 |
|
BLAKE2b-256 | e57031a6f2bdacb9b41131190370a8dd5d226d8c17187610c8147bab0bdd0c27 |
Hashes for texture2ddecoder-1.0.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59476a23866d2efff4120ce23df2169b910dccd5e01298315769d45d790d3925 |
|
MD5 | 64d12b26de9e29b2e9665d458b6dbd41 |
|
BLAKE2b-256 | 76284d896ec6ba9e14565e7d201fe941ce2050e921094768de5a98fa625b579c |
Hashes for texture2ddecoder-1.0.1-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b3f80e9d698347de5da270aab4efa7a68c0f7f09cbd92d44456351a503b8a90 |
|
MD5 | 8afd24ffe6dabd5c08d19cc6abb19e4d |
|
BLAKE2b-256 | 5148ddc51297113914000accc6acbf2068d109c678384e3929f146af0afa5a5d |