rawx_hdr{ u8 magic[4]; u32 width; u32 height; u32 bpp; (or type ?) u32 reserved; (checksum...) } -------- hdr [20bytes] -------- palette [256bytes] (optional / 8bits mode only) -------- data [width*height*4bytes] (32bits (argb) & 24bits (rgb) modes) data [width*height*2bytes] (16bits (565) mode) data [width*height*1bytes] (8bits (palette) mode) -------- endianess considerations magic = "RAWL" for little endian file magic = "RAWB" for big endian file data 24bits (rgb) => alpha channel ingnored / set to 0xff (agrb compatibility alpha=100%). --types-- ARGB32 32bits/pixel RGB32 32bits/pixel (alpha channel ignored (set to 0xff)) RGB16 (RGB 565) 16bits/pixel AP8 16bits/pixel (palette + alpha channel) P8 8bits/pixel (palette) A8 8bits/pixel (alpha channel/mask only) BW ? (black & white)