RAW file format

From DF21 Wiki
Revision as of 12:00, 9 March 2024 by Jerethk (talk | contribs) (Created page with "'''RAW''' is an image format introduced with the Dark Forces Remaster. It is the format for high resolution textures. RAW textures are true colour; they do not reference the original [https://df-21.net/documentation/DFSPECS/s_palplt.htm#PAL%20Files palettes]. RAW textures will be loaded in place of a classic texture if they have the same name (eg. <code>hello.BM</code>, <code>hello.RAW</code>). They ''must'' be exactly double the dimensions of the [https://df-21.net/doc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

RAW is an image format introduced with the Dark Forces Remaster. It is the format for high resolution textures. RAW textures are true colour; they do not reference the original palettes.

RAW textures will be loaded in place of a classic texture if they have the same name (eg. hello.BM, hello.RAW). They must be exactly double the dimensions of the BM they are replacing. For example, a 64x128 BM must be replaced by a 128x256 RAW.

File format

RAW files are headerless and uncompressed. Image width and height are obtained from the corresponding BM.

A RAW contains nothing more than an array of pixels. The number of pixels will be BM width x BM height x 4.

Each pixel is a 4 byte struct:

Pixel {
   Red
   Blue
   Green
   Alpha
}