World of Warcraft BLP2 Files

From Source Peek Wiki

Jump to: navigation, search

Contents

Please expand this page.
Further information might be found in a section of the talk page.
Please remove this message once the article has been expanded.


Header

The header is 20 bytes in length and consists of 6 fields.

Column Name Size Notes
1 FileID 4-byte BLP0, BLP1, BLP2
2 Type 1-byte 0=JPEG, 1=Palette, 2=DXTC
3 AlphaDepth 1-byte When DXTC is used, alpha depth help you determine the method used. DXT1 use either 0 or 1 bit alpha and DTX3 and DXT5 both use 8 bit alpha.
4 AlphaType 1-byte When DXTC is used, choose between DXT3 and DXT5 with this. DXT5 compression is used when this field is set to 7.
5 HasMipMaps 1-byte
5 Width 4-byte
6 Height 4-byte

Palette

The palette data has 256 entries. Each entry is 4 bytes, RGBA, or 1024 bytes total.

Column Name Size Notes
1 r 1-byte
2 g 1-byte
3 b 1-byte
4 a 1-byte

MipMap

The mipmap data starts off with the largest mipmap, and the smaller mipmaps follow, decreasing by a factor of 2. (128x128 -> 64x64 -> etc..)

Structure

  • Header (20 bytes)
  • Palette * 256 (256 * 4 bytes = 1024 bytes)
  • MipMap Offsets * 16 (16 * 4 bytes = 64 bytes)
  • MipMap Sizes * 16 (16 * 4 bytes = 64 bytes)


MIPMAP DATA follows

  • If palette, then each byte is an index (0 to 255) into the palette.
  • If DXTC, data is compressed. You need a DXT1, DXT3 or DXT5 decoder.

Note that DXTC means Direct X Texture Compression, but it is also known as S3 Texture Compression, or S3TC. S3TC is supported by all recent video cards, and is directly usable with both DirectX and OpenGL, so if you want to use a DXT-compressed BLP as a texture, you don't need to decompress it manually.

Personal tools
Sponsors