KSquare Utilities
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
BMPheader.h
Go to the documentation of this file.
1
#
ifndef
_BMPHEADER_
2
#
define
_BMPHEADER_
3
4
#
include
"KKBaseTypes.h"
5
6
namespace
KKB
7
{
8
/**
9
*@file BMPheader.h
10
*@brief Definition of structures necessary to support BMP file format.
11
*@details Because I could not find any data structures in UNIX based
12
* systems that would support the reading of BMP files I created
13
* this one file that includes data structures that would normally
14
* be found on a Windows based OS.
15
*/
16
17
#
ifndef
WIN32
18
19
//typedef unsigned kkint32 kkuint32;
20
21
//typedef unsigned char uchar;
22
23
//typedef unsigned short ushort;
24
25
//typedef unsigned _int16 WORD;
26
//typedef unsigned _int32 DWORD;
27
28
typedef
unsigned
short
WORD;
29
typedef
kkuint32
DWORD;
30
typedef
kkint32
LONG;
31
typedef
unsigned
char
BYTE;
32
33
#
define
BI_RLE4
2
34
#
define
BI_RGB
1
35
#
define
BI_RLE8
3
36
37
/**
38
* @struct BITMAPFILEHEADER
39
* @brief Windows bitmap header definition used for non-Windows systems
40
*/
41
42
typedef
struct
BITMAPFILEHEADER {
// bmfh
43
WORD bfType;
44
DWORD bfSize;
45
WORD bfReserved1;
46
WORD bfReserved2;
47
DWORD bfOffBits;
48
} BITMAPFILEHEADER;
49
50
51
/**
52
* @struct BITMAPINFOHEADER
53
* @brief Windows bitmap information header definition used for non-Windows systems
54
*/
55
56
typedef
struct
{
// bmih
57
DWORD biSize;
58
LONG biWidth;
59
LONG biHeight;
60
WORD biPlanes;
61
WORD biBitCount;
62
DWORD biCompression;
63
DWORD biSizeImage;
64
LONG biXPelsPerMeter;
65
LONG biYPelsPerMeter;
66
DWORD biClrUsed;
67
DWORD biClrImportant;
68
} BITMAPINFOHEADER;
69
70
/**
71
* @struct RGBQUAD
72
* @brief RGBQUAD definition for non-windows systems
73
*/
74
75
typedef
struct
{
76
BYTE rgbBlue;
77
BYTE rgbGreen;
78
BYTE rgbRed;
79
BYTE rgbReserved;
80
} RGBQUAD;
81
82
83
#
endif
// win32
84
}
85
86
#
endif
KKB::kkint32
__int32 kkint32
Definition:
KKBaseTypes.h:88
KKB::kkuint32
unsigned __int32 kkuint32
Definition:
KKBaseTypes.h:89
KKB::KKTHreadPtr
KKTHread * KKTHreadPtr
Definition:
KKThreadManager.h:20
KKBase
BMPheader.h
Generated on Thu Mar 31 2016 22:47:16 for KSquare Utilities by
1.8.11