Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Image.h

Go to the documentation of this file.
00001 
00007 #ifndef _IMAGE_H_
00008 #define _IMAGE_H_
00009 
00010 //#include <windows.h>
00011 #include <iostream>
00012 #include "../Util/Log.h"
00013 #include <gl\glaux.h>   // this is not supposed to be here.. (fix loadBMP)
00014 
00015 //#include "jpeg/jpeglib.h"
00016 //#pragma comment (lib, "data/libs/libjpeg.lib")
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

Generated on Sun Jun 5 15:47:04 2005 for Defacto by  doxygen 1.4.3