skillfed

texture2ddecoder

a python wrapper for Perfare's Texture2DDecoder

texture2ddecoder v1.0.6 154.2K downloads/30d#10,860 on PyPI20
Permissive 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) AGING released

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 texture2ddecoder

uv

uv add texture2ddecoder

poetry

poetry add texture2ddecoder

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Multimedia :: GraphicsTopic :: Software Development :: Libraries :: Python Modules

Tags

texture decompressiongame asset decodercompressed texture formatsastc decoderbc texture decompressionetc1 etc2 decodercrunch texture unpacker
game-assetstexture-compressionbinary-codec

More Python Modules packages