
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
A python wrapper for Perfare's Texture2DDecoder
Some changes were made to the original code to make it cross-platform compatible.
pip install texture2ddecoder
or download/clone the git and use
python setup.py install
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"))
decompresses bc1 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses bc3 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses pvrtc textures to BGRA
Params: bytes data, long width, long height, bool is2bpp Return: bytes
decompresses etc1 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses etc2 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses etc2a1 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses etc2a8 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses eacr textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses eacr_signed textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses eacrg textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses eacrg_signed textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses bc4 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses bc5 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses bc6 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses bc7 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses atc_rgb4 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses atc_rgba8 textures to BGRA
Params: bytes data, long width, long height Return: bytes
decompresses astc textures to BGRA
Params: bytes data, long width, long height, int block_width, int block_height Return: bytes
decompresses crunch textures to BGRA
Params: bytes data Return: bytes
decompresses unity_crunch textures to BGRA
Params: bytes data Return: bytes
This module itself is licensed under MIT.
The texture compression codecs themselves were derived on following sources and therefore have following licenses:
Codec | License | Source |
---|---|---|
ATC | MIT | Perfare/AssetStudio - Texture2DDecoderNative/atc.cpp |
ASTC | MIT | Ishotihadus/mikunyan - ext/decoders/native/astc.c |
BCn | MIT | Perfare/AssetStudio - Texture2DDecoderNative/bcn.cpp |
ETC | MIT | Ishotihadus/mikunyan - ext/decoders/native/etc.c |
f16 | MIT | Maratyszcza/FP16 |
PVRTC | MIT | Ishotihadus/mikunyan - ext/decoders/native/pvrtc.c |
Crunch | PUBLIC DOMAIN | BinomialLLC/crunch |
Crunch (Unity) | ZLIB | Unity-Technologies/crunch |
FAQs
a python wrapper for Perfare's Texture2DDecoder
We found that texture2ddecoder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.