ASTC decoder for PIL
Project description
ASTC_Decomp
An ASTC decoder for PIL.
The decoder uses richgel999/astc_dec to decompress the ASTC blocks.
Installation
- Cython required
PIP
pip install astc_decomp
Manual
python setup.py install
Usage
Arguments
- block_width: - Block width, in pixels.
- block_height: - Block height, in pixels.
- is_srgb: - If isSRGB is true, the spec requires the decoder to scale the LDR 8-bit endpoints to 16-bit before interpolation slightly differently, which will lead to different outputs. So be sure to set it correctly (ideally it should match whatever the encoder did). (optional arg, default : False)
PIL.Image decoder
from PIL import Image
import astc_decomp
#needs to be imported once in the active code, so that the codec can register itself
astc_data : bytes
block_width : int
block_height : int
is_srgb : bool = False
img = Image.frombytes('RGBA', size, astc_data, 'astc', (block_width, block_height, is_srgb))
raw decoder
from astc_decomp import decompress_astc
# ASTC to RGBA
rgba_data = decompress_astc(astc_data : bytes, width : int, height : int, block_width : int, block_height : int, is_srgb : bool = False)
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
astc_decomp-1.0.3.tar.gz
(58.1 kB
view hashes)
Built Distributions
astc_decomp-1.0.3-py3.9-win32.egg
(36.1 kB
view hashes)
astc_decomp-1.0.3-py3.8-win32.egg
(36.3 kB
view hashes)
astc_decomp-1.0.3-py3.7-win32.egg
(35.7 kB
view hashes)
astc_decomp-1.0.3-py3.6-win32.egg
(35.6 kB
view hashes)
Close
Hashes for astc_decomp-1.0.3-py3.9-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | e331a41c475582c7ebdac9779f5eb9b206140635cae2916acb1cadc74614b78e |
|
MD5 | dfc29123688f22dd1821d6879adaa998 |
|
BLAKE2b-256 | 305a7eafa57ef509517ec464897ab382b8fbadd6387f441c901b2bbd6d9073f3 |
Close
Hashes for astc_decomp-1.0.3-py3.9-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c7da3678f7158d66e50afe05747eacfa7a0769550d23d211f6ad4f427a3e608 |
|
MD5 | 8c2aa2df479fcea56e846ca1bd48434d |
|
BLAKE2b-256 | 99a2392595b76f2d6a6fa40c5f22fb2e72b7d7b27609dc68830c8a4d0a6cb7eb |
Close
Hashes for astc_decomp-1.0.3-py3.9-macosx-10.14-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 404393026ff5f82ec9a97673c7533727f37fccc83d3748d834076da469327060 |
|
MD5 | 32a49c2b5eeb2d3bac2ec0be45e4ed64 |
|
BLAKE2b-256 | a2a63dd9508ec4f89c0866371337d7aee923fa93216538e0e84c6b9164f90650 |
Close
Hashes for astc_decomp-1.0.3-py3.8-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b85ad9eb0798fbce63af2f64efccee7bd61193d0672a8d4a6042bcffa5f19ba |
|
MD5 | 08b5991ad612ea55efc1bd13492930c6 |
|
BLAKE2b-256 | a33370bacb257b43aa17dcd304b2638d72eaaef723207f805a3062b181d94554 |
Close
Hashes for astc_decomp-1.0.3-py3.8-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6fff3f15d6df5cc9940062c6e28ecffbe3100cb06bb2f5e9c4b29b1b3b3e16b |
|
MD5 | ee5bc50a3040f06d10bec9c38bfd8f51 |
|
BLAKE2b-256 | dd9404588bed92fde28cfa29ed0abecdb583243708b320333eb0b21c712b2d08 |
Close
Hashes for astc_decomp-1.0.3-py3.8-macosx-10.14-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64970ca9c078c4c9b7efbf25275ba87828f37df8e50ba48ef0b163abf6132081 |
|
MD5 | baa680e411b2601a9bbeeb879bde5fec |
|
BLAKE2b-256 | ddfa05f4d5bc9896d17d438affc7cb30d5db0ed788cab5a2e33930acb6ba7017 |
Close
Hashes for astc_decomp-1.0.3-py3.7-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c75290424840565808904b3e08c43a7c2fad1435fe05da5abfa2b973e38df1e |
|
MD5 | 74685be9c919ad5bc429ae2179ce940b |
|
BLAKE2b-256 | 773c746a7f7741a7acc51eb1347bdc0ac31c4ea827cce6923317ee695820198e |
Close
Hashes for astc_decomp-1.0.3-py3.7-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a01e7152fea9976cdd1fee6da1e7f36ef06748eed8a5a0d34258afaa70681e7 |
|
MD5 | e77af07fad2cb06203001d8957cc427e |
|
BLAKE2b-256 | f32227a5ae6c1808c4847276e07dff98e2e08f6c222040da104c05fa84cd30f8 |
Close
Hashes for astc_decomp-1.0.3-py3.7-macosx-10.14-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfaab0ec6890c82186f5025c5fb2c041bb52a3c21ea00f31ca464170707391c6 |
|
MD5 | 13fb10a5a8b80b9820c152b0177d0f59 |
|
BLAKE2b-256 | 6b720e728cc71fb446c560fec76713ac22822f92e49205301a74fb7d4e4b91ff |
Close
Hashes for astc_decomp-1.0.3-py3.6-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73ef4e60bfa306abb65d35796328e61c783d2597b82297b78a4e8af716621c66 |
|
MD5 | ee9590cf8f285c3316c5cd56e7885af6 |
|
BLAKE2b-256 | 70b2d2e9f1fffc8232b2749c3950e979683bb529bc74e477e13e83105e41e7d9 |
Close
Hashes for astc_decomp-1.0.3-py3.6-win32.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f01ff6495a75ade01a25059f87847a77faf16f70a9c0763082329f7a7bcf3ab |
|
MD5 | 7bc7a32dd607ac61ce281334915068c0 |
|
BLAKE2b-256 | 1de1c5360d9b873da1435c9139cae454f13c0795827a4effe7dd8b9413cd506c |
Close
Hashes for astc_decomp-1.0.3-py3.6-macosx-10.14-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ab2605ded2ad58fa5afd58658c58ba355ff3d3aa168567ece3501b53f187df4 |
|
MD5 | e39ae652efe9ccd39a7b2b4dbccb5868 |
|
BLAKE2b-256 | cbc0d861f04b32c34483dd1defadc3da395693d62a5cc2771885f31c7283ffdc |
Close
Hashes for astc_decomp-1.0.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10f15f07912bf2c1836c742eafb48c19dff80277c3de0968898e7988cca15f65 |
|
MD5 | 8f604890c4d095793c80c5c6e64aabc0 |
|
BLAKE2b-256 | 529c79f406ab4893580a33bc6aa6865b5f462c89b1e5bfd829f659ba35c960db |
Close
Hashes for astc_decomp-1.0.3-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 275c2d6c0b8483b230578ea7873e0d262f0d3a3e69afcbdbe1e788085faedaa8 |
|
MD5 | 1a2e10530337fdab22a3a2ae62f9ace1 |
|
BLAKE2b-256 | f9d2cb18b3bffb19d60f838af06d27e647541dd7b7abb4ccd226a0daded02d68 |
Close
Hashes for astc_decomp-1.0.3-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64ad751524d51afa2e7ba5da2a2b3c1991c45521f89a980527c371eefb176ee2 |
|
MD5 | 15f21220fb7361ef8fc6e82ef59a46d5 |
|
BLAKE2b-256 | 078cdcf8522266e40e08b1fc89f178317c1874365b5f1772c1aa2af47214f627 |
Close
Hashes for astc_decomp-1.0.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91bc2b8b7c4ea0c0ed154ae4d83a5b892772eaae8f0add214f7cc32ed5a334fe |
|
MD5 | 48adf52f31359416f86a02a1967c2124 |
|
BLAKE2b-256 | 55c57963fefd3eb6cca739531cfc89032c104d0d67e32ea28a507315fd3297a8 |
Close
Hashes for astc_decomp-1.0.3-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8238d7d0b58a69a0f7413befc2eb6932cf842b2c72f280f96382446dce3d0812 |
|
MD5 | cfd0b4ac0c571ec0ec5cb7b9e0538164 |
|
BLAKE2b-256 | 981d6fb2100c68ebe700548fe05ebe5ff2ae21410c23e02558a127904a166f23 |
Close
Hashes for astc_decomp-1.0.3-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb25fe5f1d5c1e4c73a32eb52463a2e4c52ff492aaa0e0c921df89fe7b381800 |
|
MD5 | 828181c6b27682c58dd79b72a1b86750 |
|
BLAKE2b-256 | 4077f448fde0e412a7830b4191522921d57fb7a8089075be3e906db9569269a8 |
Close
Hashes for astc_decomp-1.0.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c101e3398e9252ccd4ee7a07eb4988c387aa6cb94ca7f058375e6a7930c4219 |
|
MD5 | 1b863a96d7233465842118e8d65a1410 |
|
BLAKE2b-256 | 5245cbffd49c0e2ef8afa695df4882eb38fa3122f2660408b72bf6721a73eab6 |
Close
Hashes for astc_decomp-1.0.3-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 963f884c5bb6ed7de43bf4dfe1e11199f553cc884795bdb3534166c85d395727 |
|
MD5 | 4f73f180b33b619859c3acbdcada5bb3 |
|
BLAKE2b-256 | dd0ab41d944d8e70cafad716dac8f0b0c087382b39ce7d85b7b7e31274803dec |
Close
Hashes for astc_decomp-1.0.3-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a223035b19863ae517199241c23a5fa4428b1dedf476ce31ff85793ee4950ed3 |
|
MD5 | 07534e342ade041539c137b0638a58c5 |
|
BLAKE2b-256 | 65ba2003e9569686ef9d72d71e5405ff16070a67ea3c92a0f59a164dc04ece3b |
Close
Hashes for astc_decomp-1.0.3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f3054fe8fcdf0c5ae3c47cc04c23b9d0cf7e3642056c1996e0bd3eafac3adbb |
|
MD5 | 5aa7f18ac1382e89ef0699ebe00e6f2b |
|
BLAKE2b-256 | 2a422b66c44a6a94b017e9efa1aad7bc3cb44bbe5a91a624cf4bbf5f196de1dd |
Close
Hashes for astc_decomp-1.0.3-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd2fd98e43cc7e0ff06f71e10cd1c2f0733cb690728f5bfdd3475d8bf43e93b3 |
|
MD5 | b8bb47b14dd7052fbdd543d3167d86d7 |
|
BLAKE2b-256 | efc77f946bf5b971a13d3fd3930952726a2fb4ffe09c4b41cc271275fce60766 |
Close
Hashes for astc_decomp-1.0.3-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2800daef383b8893ca7d84c3cf8661da831b9ba0035f1aecffa2664b1042dad0 |
|
MD5 | dff82ca167b2a8c796446cc9e66e254f |
|
BLAKE2b-256 | 4835b7aeeda01727c8c44c0e4a0e50498ad0aed41b8efb4ae48a77a0eb54a64e |