Introduction
A .pkm file holds a texture compressed with ETC1 (Ericsson Texture
Compression). Android has methods that write and check its header, and the Godot engine
has a loader for the extension.
Structure
A 16-byte header describes the image bounds and is followed by the encoded ETC1 data.
Godot’s loader reads it as the six-byte tag PKM 10 and then five big-endian
16-bit values: a format, the texture width and height, which are multiples of 4, and the
original width and height.
Not described
Known, not yet covered
- Reference: this page is a summary; the ETC1 block encoding, other header versions and the format values are not yet described on this site.
- Viewer: the site has no viewer for PKM textures.
Links
Developers
- android.opengl.ETC1 – Android’s methods for ETC1 textures and PKM headers (Java)
Reference
- texture_loader_pkm.cpp – the PKM loader in the Godot 3.2.3 source
- OES_compressed_ETC1_RGB8_texture – the Khronos extension that Android’s documentation cites for ETC1