9 static void ReadFromStream(std::ifstream &FileStream, T *pData)
11 FileStream.read((
char *)pData,
sizeof(T));
37 bool Read(std::ifstream &FileStream)
39 ReadFromStream(FileStream, &
FileType);
40 ReadFromStream(FileStream, &
FileSize);
43 ReadFromStream(FileStream, &
Offset);
45 return !FileStream.eof();
87 bool Read(std::ifstream &FileStream)
89 ReadFromStream(FileStream, &
Size);
90 ReadFromStream(FileStream, &
Width);
91 ReadFromStream(FileStream, &
Height);
92 ReadFromStream(FileStream, &
Planes);
93 ReadFromStream(FileStream, &
BitCount);
101 return !FileStream.eof();
151 bool Load(
const std::string &FilePath);
165 static const u32 RColorMask;
168 static const u32 GColorMask;
171 static const u32 BColorMask;
184 #endif // #ifndef __BITMAP_H__ unsigned char u8
Definition: TypeDefs.h:6
u32 Compression
Definition: Bitmap.h:68
Color24 GetPixel(int X, int Y) const
Definition: Bitmap.cpp:59
bool Load(const std::string &FilePath)
Definition: Bitmap.cpp:24
u8 R
Definition: Bitmap.h:111
s32 GetHeight() const
Definition: Bitmap.h:160
Bitmap()
Definition: Bitmap.cpp:11
s32 XPixelPerMeter
Definition: Bitmap.h:74
Color24(u8 InR, u8 InG, u8 InB)
Definition: Bitmap.h:125
static bool IsLittleEndian()
リトルエンディアン?
Definition: EndianConverter.h:23
u32 ImportantColors
Definition: Bitmap.h:83
s32 GetWidth() const
Definition: Bitmap.h:157
int s32
Definition: TypeDefs.h:9
u32 Size
Definition: Bitmap.h:53
unsigned int u32
Definition: TypeDefs.h:10
static const Color24 Black
Definition: Bitmap.h:132
s32 YPixelPerMeter
Definition: Bitmap.h:77
s32 Height
Definition: Bitmap.h:59
u16 BitCount
Definition: Bitmap.h:65
u8 G
Definition: Bitmap.h:114
unsigned short u16
Definition: TypeDefs.h:8
u8 B
Definition: Bitmap.h:117
static s16 Convert(s16 Value, bool bForce=false)
符号付き16ビット変換
Definition: EndianConverter.h:37
s32 Width
Definition: Bitmap.h:56
bool Read(std::ifstream &FileStream)
Definition: Bitmap.h:87
u32 ImageSize
Definition: Bitmap.h:71
u16 Planes
Definition: Bitmap.h:62
u32 UsedColors
Definition: Bitmap.h:80
~Bitmap()
Definition: Bitmap.cpp:17
Color24()
Definition: Bitmap.h:120