maug
Quick and dirty C mini-augmentation library.
Loading...
Searching...
No Matches
Maug File Format: Bitmap

Constants and functions describing the Windows bitmap format. More...

Collaboration diagram for Maug File Format: Bitmap:

Data Structures

struct  MFMT_STRUCT_BMPINFO
 BITMAPINFO struct that comes before Windows bitmap data. More...
 
struct  MFMT_STRUCT_BMPFILE
 

Macros

#define MFMT_BMPINFO_OFS_WIDTH   4
 
#define MFMT_BMPINFO_OFS_HEIGHT   8
 
#define MFMT_BMPINFO_OFS_COLOR_PLANES   12
 
#define MFMT_BMPINFO_OFS_BPP   14
 
#define MFMT_BMPINFO_OFS_COMPRESSION   16
 
#define MFMT_BMPINFO_OFS_SZ   20
 
#define MFMT_BMPINFO_OFS_HRES   24
 
#define MFMT_BMPINFO_OFS_VRES   28
 
#define MFMT_BMPINFO_OFS_PAL_SZ   32
 
#define MFMT_BMPINFO_OFS_IMP_COLORS   36
 
#define MFMT_BMP_COMPRESSION_NONE   (0)
 MFMT_STRUCT_BMPINFO::compression value indicating none.
 
#define MFMT_BMP_COMPRESSION_RLE8   (1)
 MFMT_STRUCT_BMPINFO::compression value indicating 8-bit RLE.
 
#define MFMT_BMP_COMPRESSION_RLE4   (2)
 MFMT_STRUCT_BMPINFO::compression value indicating 4-bit RLE.
 
#define mfmt_bmp_check_header()
 

Detailed Description

Constants and functions describing the Windows bitmap format.

Macro Definition Documentation

◆ mfmt_bmp_check_header

#define mfmt_bmp_check_header ( )
Value:
if( 40 == header->sz ) { \
header_bmp_info = (struct MFMT_STRUCT_BMPINFO*)header; \
} else if( 0x4d42 == *((uint16_t*)header) ) { \
debug_printf( MFMT_TRACE_BMP_LVL, "bmp file header detected" ); \
header_bmp_file = (struct MFMT_STRUCT_BMPFILE*)header; \
header_bmp_info = &(header_bmp_file->info); \
} else { \
error_printf( "unable to select read header!" ); \
retval = MERROR_FILE; \
goto cleanup; \
}
Definition mfmt.h:111
BITMAPINFO struct that comes before Windows bitmap data.
Definition mfmt.h:86