PVRTC Decoder
A PVRTC decoder for PIL.
The decoder uses PVRTDecompress from PVRCore to decompress the data.
Installation
- Cython required
PIP
pip install pvrtc_decoder
Manual
python setup.py install
Usage
do2bit_mode:
- 0 - PVRTC2 (8 bit)
- 1 - PVRTC4 (16 bit)
PIL.Image decoder
from PIL import Image
import pvrtc_decoder
#needs to be imported once in the active code, so that the codec can register itself
raw_pvrtc_image_data : bytes
do2bit_mode = 0 # see above
img = Image.frombytes('RGBA', size, raw_pvrtc_image_data, 'pvrtc', (do2bit_mode))
raw decoder
from pvrtc_decoder import decompress_pvrtc, decompress_etc
# compressed PVRTC image bytes to RGBA bytes
rgba_data = decompress_pvrtc(compressed_data : bytes, do2bit_mode : int, width : int, height : int)
# compressed ETC image bytes to RGBA bytes
# mode seems to be unused, so use any value you want
rgba_data = decompress_etc(src_data : bytes, width : int, height : int, mode : int)
Metadata
Release files for pvrtc-decoder 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pvrtc_decoder-1.0.2.tar.gz | 46.0 kB | Without provenance | Details for pvrtc_decoder-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pvrtc_decoder-1.0.2-cp37-cp37m-win32.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-32 | Details for pvrtc_decoder-1.0.2-cp37-cp37m-win32.whl |
Total release size: 78.8 kB
Release files / pvrtc_decoder-1.0.2.tar.gz
| Download URL | pvrtc_decoder-1.0.2.tar.gz |
|---|---|
| Size | 46.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8088e71c8bd248732444ce269470d6f8348a0ef622a9fb8b975b7d710aeb382e
|
|
BLAKE2b-256 checksum How to use checksums |
a43230cef540f7bb35137925f8fb0463a36e5f748ac9c26855af5c9392e86174
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.4
|
Release files / pvrtc_decoder-1.0.2-cp37-cp37m-win32.whl
| Download URL | pvrtc_decoder-1.0.2-cp37-cp37m-win32.whl |
|---|---|
| Size | 32.8 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
675e7dce5e179793583abc7349bae8f3c6563c2bdd225ace4bfd2ad47ef84a01
|
|
BLAKE2b-256 checksum How to use checksums |
853c29e5fec3c0641739122658c7b82a195c4da694feead1659607e3dacb138e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.4
|
Security for pvrtc-decoder 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.