In file include/csgfxldr/csimage.h:

class ImageLoader

Extend this class to support a particular type of image loading

Inheritance:


Public Methods

virtual const char* GetDescription()
Return a descriptive line about this image format.
virtual const char* GetName()
Return the name of the image type supported by this loader.
static ImageFile* load(ISystem* sys, char* filename)
Load an image given the filename
static ImageFile* load(UByte* buf, ULong size)
Load an image from a buffer
static ImageFile* load(FILE* fp)
Load an image given a file pointer
static bool Register(ImageLoader* loader)
Register a loader for a given image type

Protected Methods

virtual ImageFile* LoadImage(UByte* buf, ULong size)
Load an image from the given buffer
virtual ~ImageLoader()

Documentation

Extend this class to support a particular type of image loading
virtual ImageFile* LoadImage(UByte* buf, ULong size)
Load an image from the given buffer. Attempts to read an image from the buffer 'buf' of length 'size'. If successful, returns a pointer to the resulting ImageFile. Otherwise returns NULL.

virtual ~ImageLoader()

static bool Register(ImageLoader* loader)
Register a loader for a given image type. Adds 'loader' to the list of image formats to be checked during an ImageLoader::load(...) call.

virtual const char* GetName()
Return the name of the image type supported by this loader.

virtual const char* GetDescription()
Return a descriptive line about this image format.

static ImageFile* load(ISystem* sys, char* filename)
Load an image given the filename. This routine will open the file named filename, try to recognize its type, and return an ImageFile of the appropriate type. Returns a pointer to the ImageFile on success, or NULL on failure.

static ImageFile* load(FILE* fp)
Load an image given a file pointer. This routine will read from the given file, try to recognize its type, and return an ImageFile of the appropriate type. Returns a pointer to the ImageFile on success, or NULL on failure.

static ImageFile* load(UByte* buf, ULong size)
Load an image from a buffer. This routine will read from the buffer buf of length size, try to recognize the type of image contained within, and return an ImageFile of the appropriate type. Returns a pointer to the ImageFile on success, or NULL on failure.


Direct child classes:
TGAImageLoader
PNGImageLoader
JPGImageLoader
GIFImageLoader
BMPImageLoader

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de