skillfed

etcpak

python wrapper for etcpak

etcpak v0.9.15 149.6K downloads/30d#10,990 on PyPI9
Permissive 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) AGING released

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 etcpak

uv

uv add etcpak

poetry

poetry add etcpak

Installing 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

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.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Multimedia :: GraphicsTopic :: Software Development :: Libraries :: Python Modules

Tags

texture compressionimage format conversionBC1 BC3 DXT compressionETC1 ETC2 compressionGPU texture encodingRGBA to compressed formatreal-time texture compression
texture-compressiongpu-formatsimage-encoding

More Python Modules packages