Guiliani  Version 2.5 revision 7293 (documentation build 13)
GUIImageDecoderBMP.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef GUIIMAGEDECODERBMP__H_
11#define GUIIMAGEDECODERBMP__H_
12
13#include "eC_Types.h"
14#include "eC_String.h"
15#include "eC_File.h"
16#include "GUIImageData.h"
17
18#include "GUIImageDecoder.h"
19
20
22
24{
25public:
27
28 virtual eC_Bool LoadImg(CGUIImageData& rkImageData, eC_File* pkImageFile);
29
30private:
32 struct BitmapHeader_t
33 {
34 char acType[2];
35 unsigned char acSize[4];
36 char acR1[4];
37 unsigned char acOffBits[4];
38 };
39
41 struct BitmapInfo_t
42 {
43 unsigned long ulSize;
44 long lWidth;
45 long lHeight;
46 unsigned short usPlanes;
47 unsigned short usBitCount;
48 unsigned long ulCompression;
49 unsigned long ulSizeImage;
50 long lXPPM;
51 long lYPPM;
52 unsigned long ulTotalColors;
53 unsigned long ulImportantColors;
54 };
55
56private:
63 void RevertBytes(eC_UByte* pubData, const eC_UInt& uiLen);
64
65 eC_UInt GetColorFromPalette(const eC_UByte& ubIndex);
66
67private:
68 eC_Bool m_bIsPalettized;
69 eC_UInt* m_pkPalette;
70 eC_UInt m_uiPaletteSize;
71};
72
73#endif
Contains information about an image loaded by CGUIImageLoader.
Definition: GUIImageData.h:29
Class GUIImageDecoderBMP which loads an image and returns a pointer to a GUIImageData object.
Definition: GUIImageDecoderBMP.h:24
virtual eC_Bool LoadImg(CGUIImageData &rkImageData, eC_File *pkImageFile)
Base class for the image decoders.
Definition: GUIImageDecoder.h:25