BMP File Format Description

I used the bmp format to store the hover textures. I decided to switch to the PNG format, because there is much more support with free image tools and editors.

Header (14 Bytes)
FieldSizeDescription
signature2'BM'
fileSize4 (uInt)file size in bytes
reserved4 (uInt)always zero
dataOffset4 (uInt)file offset to raster data
InfoHeader (40 Bytes)
FieldSizeDescription
size4 (uInt)size of infoheader
width4 (uInt)width of bitmap
height4 (uInt)height of bitmap
planes2 (uShort)number of planes/layers (default = 1)
bitCount2 (uShort)bits per pixel (8 for 256 colors, 24 for true color)
compression4 (uInt)type of compression (0 = no compression)
imageSize4 (uInt)size of compressed image (0 if compression 0)
xppm4 (uInt)pixels per meter (width)
yppm4 (uInt)pixels per meter (height)
colorsUsed4 (uInt)number of actually used colors
colorsImportant4 (uInt)numbers that are important (0 = all)
ColorTable (256 × 4 Bytes)
FieldSizeDescription
blueValue1 (uByte)blue color value
greenValue1 (uByte)green color value
redValue1 (uByte)red color value
reserved1 (uByte)always zero
RasterData (if 8 bit)
FieldSizeDescription
colorEntry1 (uByte)value from color table
RasterData (if 24 bit)
FieldSizeDescription
blueValue1 (uByte)blue color value
greenValue1 (uByte)green color value
redValue1 (uByte)red color value

Padding for pixel rows

Please note: Don't forget the 4 bytes padding at the end of each pixel row.