texture2ddecoder
a python wrapper for Perfare's Texture2DDecoder
What it is and what it does
texture2ddecoder is a Python wrapper around native texture decompression routines for formats commonly found in game assets and 3D applications. It takes compressed binary texture data (in formats like BC1, BC3, ETC1, ETC2, PVRTC, ASTC, ATC, and Crunch variants) along with dimensions and block parameters, and returns raw BGRA pixel bytes suitable for image reconstruction or further processing.
The package is a thin binding to cross-platform C implementations of these codecs, with no Python runtime dependencies. It's designed for developers who need to extract or convert game textures, analyze asset pipelines, or integrate texture decompression into asset processing workflows. The main gotcha is that decode_pvrtc can segfault on macOS, and the package requires a pre-built wheel for your specific platform and Python version.
Use it for:
- Extract and convert game textures from asset bundles or game files for analysis or modding
- Batch decompress ASTC textures from mobile game assets into standard image formats
- Build asset pipeline tools that need to read compressed textures from game engines
- Integrate texture decompression into game modding or reverse-engineering workflows
- Convert ETC or PVRTC textures from mobile platforms to desktop-compatible formats
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Decodes compressed texture formats (BC, PVRTC, ETC, ASTC, ATC, Crunch) used in game assets and 3D applications, converting them to raw BGRA pixel data.
Yes, if you need to decompress game textures. The package is stable, permissively licensed, has no runtime dependencies, and covers a wide range of compression formats. Install friction is moderate due to platform-specific wheels, but pre-built binaries exist for common platforms. Avoid decode_pvrtc on macOS due to known segfault risk.
Install
texture2ddecoder on PyPI
pip
pip install texture2ddecoderuv
uv add texture2ddecoderpoetry
poetry add texture2ddecoderInstalling texture2ddecoder
Before you install
Medium install friction due to compiled wheels across many platforms. Package is aging (210 days since last release) but repo remains active with recent commits. No runtime dependencies simplifies deployment.
License in practice
MIT-licensed with permissive terms. Underlying codec implementations carry mixed licenses (MIT, public domain, zlib) but all are permissive, so commercial and proprietary use is allowed.
Quickstart
import texture2ddecoder
data = open("texture_file", "rb").read()
decoded = texture2ddecoder.decode_astc(data, width=512, height=512, block_width=4, block_height=4)
decode_pvrtc can cause segfaults on macOS; compiled wheels required for your platform.
Verify before relying
- Whether the package handles all modern game engine texture formats or only a subset of the listed codecs
- Performance characteristics when decoding large or many textures in sequence
- Compatibility with texture formats beyond those explicitly documented
Package facts
| License | MIT License Copyright (c) 2020 K0lb3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 210 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 154,172/month — #10,860 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: texture2ddecoder-1.0.6-cp310-cp310-macosx_10_9_x86_64.whl; texture2ddecoder-1.0.6-cp310-cp310-macosx_11_0_arm64.whl; texture2ddecoder-1.0.6-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl; texture2ddecoder-1.0.6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; texture2ddecoder-1.0.6-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; texture2ddecoder-1.0.6-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; texture2ddecoder-1.0.6-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; texture2ddecoder-1.0.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; texture2ddecoder-1.0.6-cp310-cp310-musllinux_1_2_aarch64.whl; texture2ddecoder-1.0.6-cp310-cp310-musllinux_1_2_armv7l.whl; texture2ddecoder-1.0.6-cp310-cp310-musllinux_1_2_i686.whl; texture2ddecoder-1.0.6-cp310-cp310-musllinux_1_2_ppc64le.whl; texture2ddecoder-1.0.6-cp310-cp310-musllinux_1_2_s390x.whl; texture2ddecoder-1.0.6-cp310-cp310-musllinux_1_2_x86_64.whl; texture2ddecoder-1.0.6-cp310-cp310-win32.whl; texture2ddecoder-1.0.6-cp310-cp310-win_amd64.whl; texture2ddecoder-1.0.6-cp310-cp310-win_arm64.whl; texture2ddecoder-1.0.6-cp311-abi3-macosx_10_9_x86_64.whl; texture2ddecoder-1.0.6-cp311-abi3-macosx_11_0_arm64.whl; texture2ddecoder-1.0.6-cp311-abi3-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl
Keywords: astc, texture
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
astc-encoder-pyastc-encoder-py compresses and decompresses…
permissive · top 15,000 on PyPI
etcpakCompresses image data into GPU-friendly texture…
permissive · top 15,000 on PyPI
UnityPyUnityPy extracts and edits Unity asset files…
permissive · top 15,000 on PyPI
pcodecPcodec compresses and decompresses numerical…
unclear · top 15,000 on PyPI
pyzbarDecodes one-dimensional barcodes and QR codes…
permissive · top 5,000 on PyPI
listcrunchCompresses sequences of repeated values into a…
permissive · top 15,000 on PyPI
simplejpegEncodes and decodes JPEG images directly to and…
permissive · top 15,000 on PyPI
pylibdmtxReads and writes Data Matrix barcodes,…
permissive · top 15,000 on PyPI
mbstrdecoderDecodes multi-byte character strings by…
permissive · top 5,000 on PyPI
OpenEXRRead and write OpenEXR image files with support…
unclear · top 15,000 on PyPI