Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

Image.h

00001 /*************************************************************************** 00002 * This file is part of OpenCAL: Open Computer Animation Library * 00003 * I created OpenCAL as my master's thesis Computer Science (multimedia) * 00004 * at the tUL university in Diepenbeek, Belgium * 00005 * * 00006 * Copyright (C) 2003-2004 by Jeroen Dierckx * 00007 * jeroen.dierckx@student.luc.ac.be * 00008 * * 00009 ***************************************************************************/ 00010 00011 #ifndef OPENCAL_UTILS_IMAGE_H 00012 #define OPENCAL_UTILS_IMAGE_H 00013 00014 // Includes 00015 #include <OpenCAL/global.h> 00016 00017 00018 namespace OpenCAL 00019 { 00020 namespace Utils 00021 { 00027 class OPENCAL_API Image 00028 { 00029 protected: 00030 // Member variables 00031 unsigned int m_width, m_height, m_depth; 00032 unsigned char *m_data; 00033 00034 public: 00035 // Constructors and destructor 00036 Image(unsigned int width, unsigned int height, unsigned int depth = 3); 00037 Image(const string &filename); 00038 virtual ~Image(); 00039 00040 // Get functions 00041 unsigned int getWidth() const { return m_width; } 00042 unsigned int getHeight() const { return m_height; } 00043 unsigned int getDepth() const { return m_depth; } 00044 const unsigned char *getData() const { return m_data; } 00045 unsigned char *getData() { return m_data; } 00046 00047 // Other functions 00048 void resize(unsigned int width, unsigned int height, unsigned int depth); 00049 void clear(); 00050 00051 friend class ImageLoader; 00052 }; 00053 } 00054 } 00055 00056 #endif // OPENCAL_UTILS_IMAGE_H

Generated on Sun Aug 15 19:19:22 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8