BMP_Header Struct Reference

BMP Module header structure.

#include <bmp.h>

Data Fields

uint16_t magic
 Magic identifier: "BM" (for bmp files)
 
uint32_t fileSize
 Size of the bmp file in bytes.
 
uint16_t reserved1
 Reserved 1.
 
uint16_t reserved2
 Reserved 2.
 
uint32_t dataOffset
 Data offset relative to the start of the bmp data.
 
uint32_t headerSize
 Header size in bytes.
 
uint32_t width
 Width of bmp.
 
uint32_t height
 Height of bmp.
 
uint16_t colorPlanes
 Color planes.
 
uint16_t bitsPerPixel
 Color depth.
 
uint32_t compressionType
 Compression type.
 
uint32_t imageDataSize
 Size of raw BMP data.
 
uint32_t hPixelsPerMeter
 Horizontal resolution (pixels per meter)
 
uint32_t vPixelsPerMeter
 Vertical resolution (pixels per meter)
 
uint32_t colorsUsed
 Number of color indices in the color table that are actually used by the bitmap.
 
uint32_t colorsRequired
 Number of color indices that are required for displaying the bitmap.
 

BMP Module header structure.

Must be packed to exact 54 bytes.

Field Documentation

◆ magic

uint16_t BMP_Header::magic

Magic identifier: "BM" (for bmp files)

◆ fileSize

uint32_t BMP_Header::fileSize

Size of the bmp file in bytes.

◆ reserved1

uint16_t BMP_Header::reserved1

Reserved 1.

◆ reserved2

uint16_t BMP_Header::reserved2

Reserved 2.

◆ dataOffset

uint32_t BMP_Header::dataOffset

Data offset relative to the start of the bmp data.

◆ headerSize

uint32_t BMP_Header::headerSize

Header size in bytes.

◆ width

uint32_t BMP_Header::width

Width of bmp.

◆ height

uint32_t BMP_Header::height

Height of bmp.

◆ colorPlanes

uint16_t BMP_Header::colorPlanes

Color planes.

◆ bitsPerPixel

uint16_t BMP_Header::bitsPerPixel

Color depth.

◆ compressionType

uint32_t BMP_Header::compressionType

Compression type.

◆ imageDataSize

uint32_t BMP_Header::imageDataSize

Size of raw BMP data.

◆ hPixelsPerMeter

uint32_t BMP_Header::hPixelsPerMeter

Horizontal resolution (pixels per meter)

◆ vPixelsPerMeter

uint32_t BMP_Header::vPixelsPerMeter

Vertical resolution (pixels per meter)

◆ colorsUsed

uint32_t BMP_Header::colorsUsed

Number of color indices in the color table that are actually used by the bitmap.

◆ colorsRequired

uint32_t BMP_Header::colorsRequired

Number of color indices that are required for displaying the bitmap.