blob: 0c0e51e2e795ad834efa952f97ae76cc83304682 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/**
* @file llimagebmp.h
* @brief Image implementation for BMP.
*
* Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
* $License$
*/
#ifndef LL_LLIMAGEBMP_H
#define LL_LLIMAGEBMP_H
#include "llimage.h"
// This class compresses and decompressed BMP files
class LLImageBMP : public LLImageFormatted
{
protected:
virtual ~LLImageBMP();
public:
LLImageBMP();
/*virtual*/ BOOL updateData();
/*virtual*/ BOOL decode(LLImageRaw* raw_image, F32 time=0.0);
/*virtual*/ BOOL encode(const LLImageRaw* raw_image, F32 time=0.0);
protected:
BOOL decodeColorTable8( U8* dst, U8* src );
BOOL decodeColorMask16( U8* dst, U8* src );
BOOL decodeTruecolor24( U8* dst, U8* src );
BOOL decodeColorMask32( U8* dst, U8* src );
U32 countTrailingZeros( U32 m );
protected:
S32 mColorPaletteColors;
U8* mColorPalette;
S32 mBitmapOffset;
S32 mBitsPerPixel;
U32 mBitfieldMask[4]; // rgba
BOOL mOriginAtTop;
};
#endif
|