Format:ASTC file (.astc)
Appearance
| Magic | 13 AB A1 5C |
|---|---|
| Extensions | .astc |
| Endianness | little |
| On this wiki | Facts · Code · Notes · Topics |
The plain .astc file written by ARM's astcenc: a 16-byte header (magic 13 AB A1 5C, block size x/y/z, 24-bit image dimensions) followed by 16-byte ASTC blocks.
Header
The 16-byte header: magic (bytes 13 AB A1 5C, the little-endian form of 0x5CA1AB13), block_x, block_y, block_z (texels; a zero is treated as 1), then three 3-byte little-endian dimensions dim_x, dim_y, dim_z in texels (all must be nonzero; a 2D image has block_z 1 and dim_z 1). The number of blocks is not stored: it is ceil(dim/block) per axis, and astcenc computes the data size as blocks_x * blocks_y * blocks_z * 16, so every ASTC block is 16 bytes. The dimensions are limited to 2^24 - 1.
Notes
- This header is the astcenc file convention. Games normally store raw ASTC blocks inside other containers (Format:KTX and KTX2 (Khronos texture), Format:BNTX) with the block footprint taken from the container's format id.
- Footprints used by Basis Universal's ASTC LDR formats: 4x4, 5x4, 5x5, 6x5, 6x6, 8x5, 8x6, 10x5, 10x6, 8x8, 10x8, 10x10, 12x10, 12x12 (see Format:Basis Universal (.basis)).
- See Technique:Block-compressed texture formats.
Code & repositories
- https://github.com/ARM-software/astc-encoder @
46c2caa7537aa9cd30595490a3dd33b503faa47c· license: Apache-2.0
ARM astcenc, writes/reads the .astc file header; Apache-2.0
Tested on: source read, not run: source read, no build · checked 2026-10-19; last activity 2026-10-15; Note: the latest release ships binaries; the wiki links only the source, never the binaries