summaryrefslogtreecommitdiff
path: root/indra/llimage/llimagebmp.h
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2007-01-02 08:33:20 +0000
committerJames Cook <james@lindenlab.com>2007-01-02 08:33:20 +0000
commit420b91db29485df39fd6e724e782c449158811cb (patch)
treeb471a94563af914d3ed3edd3e856d21cb1b69945 /indra/llimage/llimagebmp.h
Print done when done.
Diffstat (limited to 'indra/llimage/llimagebmp.h')
-rw-r--r--indra/llimage/llimagebmp.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/indra/llimage/llimagebmp.h b/indra/llimage/llimagebmp.h
new file mode 100644
index 0000000000..0c0e51e2e7
--- /dev/null
+++ b/indra/llimage/llimagebmp.h
@@ -0,0 +1,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