00001
00007 #ifndef _IMAGE_H_
00008 #define _IMAGE_H_
00009
00010
00011 #include <iostream>
00012 #include "../Util/Log.h"
00013 #include <gl\glaux.h>
00014
00015
00016
00017
00018 class Image {
00019 public:
00020 Image();
00021 virtual ~Image();
00022 bool loadImage(const char *filename);
00023 void clear();
00024
00025 int getHeight() const;
00026 int getWidth() const;
00027 int getFormat() const;
00028 unsigned char *getData() const;
00029
00030 bool toNormalMap(const bool useRGBA = true, const bool keepHeight = false);
00031 bool toGrayScale(const bool isRGBA = true, const bool reallocate = true);
00032 bool alphaFade();
00033
00034 protected:
00035 bool loadBMP(const char *filename);
00036
00037 public:
00038 unsigned char *data;
00039 int width, height;
00040 unsigned int format;
00041 };
00042
00043 #endif