etcpack (for python)
A cython wrapper for etcpack that integrates etcpack into Pillow as codec.
Install via
python setup.py install
- Cython is required
usage example
from PIL import Image
import etcpack
#needs to be imported once in the active code, so that the codec can register itself
raw_etc_image_data : bytes
mode = 'RGB'/'RGBA' # depending on the ETC mode
args = (x, ) # x depending on the ETC mode
img = Image.frombytes(mode, size, raw_etc_image_data, 'etc2', args)
codec table
| ETC mode | arg | mode |
|---|---|---|
| ETC1_RGB_NO_MIPMAPS | 0 | RGB |
| ETC2PACKAGE_RGB_NO_MIPMAPS | 1 | RGB |
| ETC2PACKAGE_RGBA_NO_MIPMAPS_OLD | 2 | RGBA |
| ETC2PACKAGE_RGBA_NO_MIPMAPS | 3 | RGBA |
| ETC2PACKAGE_RGBA1_NO_MIPMAPS | 4 | RGBA |
| ETC2PACKAGE_R_NO_MIPMAPS | 5 | R or A |
| ETC2PACKAGE_RG_NO_MIPMAPS | 6 | RGA |
| ETC2PACKAGE_R_SIGNED_NO_MIPMAPS | 7 | R or A |
| ETC2PACKAGE_RG_SIGNED_NO_MIPMAPS | 8 | RGA |
| ETC2PACKAGE_sRGB_NO_MIPMAPS | 9 | RGB |
| ETC2PACKAGE_sRGBA_NO_MIPMAPS | 10 | RGBA |
| ETC2PACKAGE_sRGBA1_NO_MIPMAPS | 11 | RGBA |
notes
- compression isn't implemented
- RG is untested
Metadata
Release files for etcpack 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 |
|---|---|---|---|---|
| etcpack-1.0.2.tar.gz | 142.9 kB | Without provenance | Details for etcpack-1.0.2.tar.gz |
Release files / etcpack-1.0.2.tar.gz
| Download URL | etcpack-1.0.2.tar.gz |
|---|---|
| Size | 142.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eaca1345ea1aee18c21b04d2b10d0454220db75a36809bcc9877a91bec21b952
|
|
BLAKE2b-256 checksum How to use checksums |
3ca1dcff88617f7467745c3d21d602b8b1785a849d2ee7eeed031428a3e4d429
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for etcpack 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.