ImageLoader Class Reference

This is an abstract class that define the interface of all image loader. More...

#include <SILLYImageLoader.h>

Inheritance diagram for ImageLoader:

Inheritance graph
[legend]
Collaboration diagram for ImageLoader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void destroyContext (ImageContext *context)
 Destroy the image context.
const char * getIdentifierString () const
 Return the name of the loader.
virtual ImageContextloadHeader (PixelFormat &formatSource, DataSource *data)=0
 Parse the header of the image and fill the header struct.
virtual bool loadImageData (PixelOrigin origin, DataSource *data, ImageContext *context)=0
 Parse the pixels data of the image and fill the header struct.
virtual ~ImageLoader ()
 Destructor.

Protected Member Functions

 ImageLoader (const char *name)
 Constructor.

Detailed Description

This is an abstract class that define the interface of all image loader.

In order to add support for new image format one have to inherits this class and implement all required function.

Definition at line 46 of file SILLYImageLoader.h.


Member Function Documentation

void destroyContext ( ImageContext context  ) 

Destroy the image context.

Parameters:
context a pointer to the context

Definition at line 47 of file SILLYImageLoader.cpp.

virtual ImageContext* loadHeader ( PixelFormat formatSource,
DataSource data 
) [pure virtual]

Parse the header of the image and fill the header struct.

Parameters:
formatSource this var should contains the pixel format used to store the image initialy
data the input of the image data
Returns:
Context for the rest of the parsing or 0 if an error occured

Implemented in JPGImageLoader, PNGImageLoader, and TGAImageLoader.

virtual bool loadImageData ( PixelOrigin  origin,
DataSource data,
ImageContext context 
) [pure virtual]

Parse the pixels data of the image and fill the header struct.

Parameters:
origin the layout of the pixel in the resulting pixel array
data the input of the image data
context the data associated to the image parsing
Returns:
true on success false on error

Implemented in JPGImageLoader, PNGImageLoader, and TGAImageLoader.


The documentation for this class was generated from the following files:
Generated on Sun Apr 6 14:47:08 2008 for Simple Image Loading LibrarY by  doxygen 1.5.2