etcpak
python wrapper for etcpak
What it is and what it does
etcpak is a Python wrapper around the wolfpld/etcpak C++ texture compression library. It provides functions to compress raw image data (in RGBA or BGRA format) into GPU-friendly texture compression formats: BC1 and BC3 (DXT variants), ETC1 and ETC2 (Ericsson Texture Compression), and ASTC. The library is designed for real-time or batch texture encoding in graphics pipelines, game engines, and image processing workflows.
The package requires image data as raw bytes in a specific channel order (RGBA for DXT, BGRA for ETC), along with width and height dimensions. It exposes compression functions with optional dithering variants. The wrapper is thin and direct—it maps closely to the underlying C++ API with minimal abstraction. Installation requires Python 3.7 or later and depends on archspec; pre-built wheels are available for most platforms.
Use it for:
- Batch-compress game textures to BC3/DXT5 format for real-time rendering on desktop platforms.
- Convert images to ETC2 format for mobile game assets before deployment.
- Generate multiple compressed texture variants from a single source image for format comparison.
- Integrate texture encoding into asset pipelines that require GPU-compatible formats.
- Compress RGBA image data to BC1 with optional dithering for memory-constrained environments.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Compresses image data into GPU-friendly texture formats (BC1, BC3, ETC1, ETC2) via Python bindings to the etcpak C++ library.
Yes, if you need to compress image data into GPU texture formats (BC, ETC, ASTC) and are comfortable with the thin wrapper's direct API and byte-order requirements. The library is stable, permissively licensed, and has broad platform coverage. Install friction is moderate due to compiled wheels, but pre-built binaries are available. Maintenance is aging—no active development beyond the latest release—so expect no new features or rapid bug fixes, but the core functionality is mature and unlikely to break.
Install
etcpak on PyPI
pip
pip install etcpakuv
uv add etcpakpoetry
poetry add etcpakInstalling etcpak
Before you install
Medium install friction due to compiled binary wheels; however, pre-built wheels cover most common platforms (x86_64, ARM, PyPy). Last release was 2025-08-11, but the project shows aging maintenance signals with no activity beyond that release.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open-source and commercial projects.
Quickstart
pip install etcpak
import etcpak
# compress raw RGBA bytes to BC3
compressed = etcpak.compress_bc3(img_data, width, height)
Image data must be in the exact channel order required by each format (RGBA for DXT functions, BGRA for ETC functions); image dimensions must be multiples of 4 for most formats.
Verify before relying
- Whether archspec is actually used at runtime or is a build-time-only dependency
- Performance characteristics compared to other texture compression libraries
- Whether ASTC compression is fully implemented despite being listed in keywords
Package facts
| License | MIT License Copyright (c) 2021 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 | 1 — archspec |
| Maintenance | aging — 368 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 149,561/month — #10,990 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: etcpak-0.9.15-cp37-abi3-macosx_10_9_x86_64.whl; etcpak-0.9.15-cp37-abi3-macosx_11_0_arm64.whl; etcpak-0.9.15-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; etcpak-0.9.15-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl; etcpak-0.9.15-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; etcpak-0.9.15-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl; etcpak-0.9.15-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; etcpak-0.9.15-cp37-abi3-musllinux_1_2_aarch64.whl; etcpak-0.9.15-cp37-abi3-musllinux_1_2_armv7l.whl; etcpak-0.9.15-cp37-abi3-musllinux_1_2_i686.whl; etcpak-0.9.15-cp37-abi3-musllinux_1_2_ppc64le.whl; etcpak-0.9.15-cp37-abi3-musllinux_1_2_s390x.whl; etcpak-0.9.15-cp37-abi3-musllinux_1_2_x86_64.whl; etcpak-0.9.15-cp37-abi3-win32.whl; etcpak-0.9.15-cp37-abi3-win_amd64.whl; etcpak-0.9.15-pp310-pypy310_pp73-macosx_10_15_x86_64.whl; etcpak-0.9.15-pp310-pypy310_pp73-macosx_11_0_arm64.whl; etcpak-0.9.15-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; etcpak-0.9.15-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl; etcpak-0.9.15-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.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
texture2ddecoderDecodes compressed texture formats (BC, PVRTC,…
permissive · top 15,000 on PyPI
UnityPyUnityPy extracts and edits Unity asset files…
permissive · top 15,000 on PyPI
astc-encoder-pyastc-encoder-py compresses and decompresses…
permissive · top 15,000 on PyPI
epaper-ditheringConverts images to dithered output optimized…
permissive · top 15,000 on PyPI
pyjpeglsEncodes and decodes image data using the…
permissive · top 15,000 on PyPI
turbojpegPython bindings for libjpeg-turbo that provide…
unclear · top 15,000 on PyPI
xatlasGenerates UV texture coordinates for 3D…
permissive · top 15,000 on PyPI
pcodecPcodec compresses and decompresses numerical…
unclear · top 15,000 on PyPI
qoiA Python wrapper for the QOI (Quite OK Image)…
permissive · top 15,000 on PyPI
vtracerConverts raster images (JPG, PNG) into vector…
permissive · top 15,000 on PyPI