ImageLoader Class Reference

#include <ImageLoader.h>

List of all members.

Public Member Functions

 ImageLoader (void)
 ~ImageLoader (void)
void loadImage (const char *fileName)
bool hasAlphaChannel ()
int getGLImageFormat ()
unsigned int getImageWidth ()
unsigned int getImageHeight ()
unsigned char * getImage ()


Detailed Description

This class loads an image from a file and keeps the image data until another file is loaded. It uses the DevIL library (previously known as OpenIL) to load the files (http://openil.sourceforge.net/).

Author:
Fabricio Anastacio - fabriciocfa@yahoo.com
Since:
August 7, 2007


Constructor & Destructor Documentation

ImageLoader::ImageLoader ( void   ) 

Constructs a image loader.

ImageLoader::~ImageLoader ( void   ) 

Destroys this image loader.


Member Function Documentation

void ImageLoader::loadImage ( const char *  fileName  ) 

Loads an image from the given file.

Parameters:
imageFile the path to the image file to be loaded.
Exceptions:
std::invalid_argument if the given image file cannot be loaded.

bool ImageLoader::hasAlphaChannel (  ) 

Returns true if the loaded image has an alpha channel.

Returns:
true if the loaded image has an alpha channel, false otherwise.

int ImageLoader::getGLImageFormat (  ) 

Returns the OpenGL format of the loaded image.

Returns:
the OpenGL format of the loaded image.

unsigned int ImageLoader::getImageWidth (  ) 

Returns the loaded image width.

Returns:
the loaded image width.

unsigned int ImageLoader::getImageHeight (  ) 

Returns the loaded image height.

Returns:
the loaded image height.

unsigned char * ImageLoader::getImage (  ) 

Returns the loaded image array of pixels.

Returns:
the loaded image array of pixels.


The documentation for this class was generated from the following files:
Generated on Fri Dec 21 17:46:08 2007 for LargeDisplayFrameworkToolkit by  doxygen 1.5.2