TXTR (File Format): Difference between revisions
From Wexos's Wiki
Jump to navigationJump to search
(Created page with "'''TXTR''' ('''T'''e'''XT'''u'''R'''e) is a texture file format stores as subfiles in PAK files. It is used in games like Donkey Kong Country Returns and developed by RetroStudios. = File Format = == Header == The file starts with a header of size 0x0C: {| class="wikitable" ! Offset !! Type !! Description |- | 0x00 || UInt32 || '''Image format'''. |- | 0x04 || UInt16 || '''Width of...") |
No edit summary |
||
| Line 9: | Line 9: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
| 0x00 || UInt32 || '''[[ | | 0x00 || UInt32 || '''[[#Image Formats|Image format]]'''. See [[GameCube and Wii Image Formats|here]] for details. | ||
|- | |- | ||
| 0x04 || UInt16 || '''Width of image''' in pixels. | | 0x04 || UInt16 || '''Width of image''' in pixels. | ||
| Line 24: | Line 24: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
| 0x00 || UInt32 || '''[[ | | 0x00 || UInt32 || '''[[#Image Formats|Palette format]]'''. See [[GameCube and Wii Image Formats|here]] for details. | ||
|- | |- | ||
| 0x04 || UInt16 || '''Palette width''' (?). Always 1 for C4, 256 for C8. | | 0x04 || UInt16 || '''Palette width''' (?). Always 1 for C4, 256 for C8. | ||
| Line 35: | Line 35: | ||
== Image Data == | == Image Data == | ||
The image data follows the [[#Header|header]], or the [[#Palette|palette data]] if palettes exist. | The image data follows the [[#Header|header]], or the [[#Palette|palette data]] if palettes exist. | ||
== Image Formats == | |||
The following image formats are available: | |||
{| class="textbox grid alt center sortable" | |||
|+ Image Formats | |||
! ID !! Name !! Bits per pixel | |||
|- | |||
| 0x00 || I4 || 4 | |||
|- | |||
| 0x01 || I8 || 8 | |||
|- | |||
| 0x02 || IA4 || 8 | |||
|- | |||
| 0x03 || IA8 || 16 | |||
|- | |||
| 0x04 || C4 || 4 | |||
|- | |||
| 0x05 || C8 || 8 | |||
|- | |||
| 0x06 || C14X2 || 16 | |||
|- | |||
| 0x07 || RGB565 || 16 | |||
|- | |||
| 0x08 || RGB5A3 || 16 | |||
|- | |||
| 0x09 || RGBA8 || 32 | |||
|- | |||
| 0x0A || CMPR || 4 | |||
|} | |||
The following palette formats are available: | |||
{| class="textbox grid alt center sortable" | |||
|+ Palette Formats | |||
! ID !! Name !! Bits per palette | |||
|- | |||
| 0x00 || IA8 || 16 | |||
|- | |||
| 0x01 || RGB565 || 16 | |||
|- | |||
| 0x02 || RGB5A3 || 16 | |||
|} | |||
= Tools = | = Tools = | ||
Latest revision as of 17:03, 12 July 2025
TXTR (TeXTuRe) is a texture file format stores as subfiles in PAK files. It is used in games like Donkey Kong Country Returns and developed by RetroStudios.
File Format
Header
The file starts with a header of size 0x0C:
| Offset | Type | Description |
|---|---|---|
| 0x00 | UInt32 | Image format. See here for details. |
| 0x04 | UInt16 | Width of image in pixels. |
| 0x06 | UInt16 | Height of image in pixels. |
| 0x08 | UInt32 | Number of mipmaps, including main image. |
Palette
If the image format is a palette format, in other words C4, C8 or C14X2, the following structure follows the header:
| Offset | Type | Description |
|---|---|---|
| 0x00 | UInt32 | Palette format. See here for details. |
| 0x04 | UInt16 | Palette width (?). Always 1 for C4, 256 for C8. |
| 0x06 | UInt16 | Palette height (?). Always 16 for C4, 1 for C8. |
The palette data follows.
Image Data
The image data follows the header, or the palette data if palettes exist.
Image Formats
The following image formats are available:
| ID | Name | Bits per pixel |
|---|---|---|
| 0x00 | I4 | 4 |
| 0x01 | I8 | 8 |
| 0x02 | IA4 | 8 |
| 0x03 | IA8 | 16 |
| 0x04 | C4 | 4 |
| 0x05 | C8 | 8 |
| 0x06 | C14X2 | 16 |
| 0x07 | RGB565 | 16 |
| 0x08 | RGB5A3 | 16 |
| 0x09 | RGBA8 | 32 |
| 0x0A | CMPR | 4 |
The following palette formats are available:
| ID | Name | Bits per palette |
|---|---|---|
| 0x00 | IA8 | 16 |
| 0x01 | RGB565 | 16 |
| 0x02 | RGB5A3 | 16 |
Tools
The following tools can handle TXTR files:
- crPakTool by jellees