#ifndef _IMAGE_H_#define _IMAGE_H_/***********************************************************************************	@file			Image.h**	@brief		Class to load JPEG or PNG files into RAM.**	@version		1.0**	@date			28/12/2009**	@author		Franck P. Vidal**	@section		Copyright*					(c) by Franck P. Vidal franck.p.vidal@gmail.com, December 2009, 2009, version 1.0**********************************************************************************///******************************************************************************//	Include//******************************************************************************#ifdef __APPLE__#include <OpenGL/gl.h>#else#include <GL/gl.h>#endif//==============================================================================/***	@class	Image*	@brief	Image is a class to load JPEG or PNG files into RAM.*///==============================================================================class Image{//******************************************************************************public:	//---------------------------------------------------------------------------	///	Default constructor.	//---------------------------------------------------------------------------	Image();	//---------------------------------------------------------------------------	///	Destructor.	//---------------------------------------------------------------------------	~Image();		//---------------------------------------------------------------------------	///	Release memory.	//---------------------------------------------------------------------------	void Delete();		//---------------------------------------------------------------------------	///	Load a JPEG file into RAM.	/**	*	@param aFileName	: the name of the file to load	*	@return	true if the file has been successfully loaded, false otherwise	*/	//---------------------------------------------------------------------------	bool LoadJPEG(const char* aFileName);		//---------------------------------------------------------------------------	///	Load a PNG file into RAM.	/**	*	@param aFileName	: the name of the file to load	*	@return	true if the file has been successfully loaded, false otherwise	*/	//---------------------------------------------------------------------------	bool LoadPNG(const char* aFileName);			//---------------------------------------------------------------------------	///	Accessor on the image width (in pixels).	/**	*	@return	the image width in pixels	*/	//---------------------------------------------------------------------------	unsigned int GetWidth() const;	//---------------------------------------------------------------------------	///	Accessor on the image height (in pixels).	/**	*	@return	the image height in pixels	*/	//---------------------------------------------------------------------------	unsigned int GetHeight() const;	//---------------------------------------------------------------------------	///	Accessor on the image format. Valid formats are:	///	GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, and GL_RGBA.	/**	*	@return	the image format	*/	//---------------------------------------------------------------------------	unsigned int GetFormat() const;	//---------------------------------------------------------------------------	///	Accessor on the pixel depth (in number of bits per colour component).	/**	*	@return	the pixel depth in number of bits per colour component	*/	//---------------------------------------------------------------------------	int GetBitDepth() const;			//---------------------------------------------------------------------------	///	Accessor on the image data.	/**	*	@return	the raw data	*/	//---------------------------------------------------------------------------	const unsigned char* GetData() const;//******************************************************************************protected:	unsigned int   m_width;			///< image width in pixels	unsigned int   m_height;		///< image height in pixels	GLenum         m_format;		///< image format, valid formats are: GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, and GL_RGBA	int            m_bit_depth;	///< pixel depth in number of bits per colour component	unsigned char* m_p_data;		///< image raw data};//******************************************************************************//	Inline source code//******************************************************************************#include "Image.inl"#endif // _IMAGE_H_