//------------------------------------------------------------------- // bmp.h // // Defines the layout of a .bmp graphic file's data-structures. // // Reference: // Jay Link, "Linux Graphics Programming with SVGAlib," // The Coriolis Open Press (2000), 190-197. // // programmer: ALLAN CRUSE // written on: 13 NOV 2003 //------------------------------------------------------------------- typedef unsigned char u8; typedef unsigned short u16; typedef unsigned long u32; typedef unsigned long long u64; typedef struct { u8 bfType[2]; u32 bfSize __attribute__((packed)); u16 bfReserved1 __attribute__((packed)); u16 bfReserved2 __attribute__((packed)); u32 bfOffBits __attribute__((packed)); } BITMAPFILEHEADER; typedef struct { u32 biSize; u32 biWidth; u32 biHeight; u16 biPlanes; u16 biBitCount; u32 biCompression; u32 biSizeImage; u32 biXPelsPerMeter; u32 biYPelsPerMeter; u32 biClrUsed; u32 biClrImportant; } BITMAPINFOHEADER; typedef struct { u8 rgbBlue; u8 rgbGreen; u8 rgbRed; u8 rgbReserved; } RGBQUAD; typedef struct { u8 rgbBlue; u8 rgbGreen; u8 rgbRed; } RGBTRIO;