In file include/csgfxldr/csimage.h:

class ImageFile

An abstract class implementing an image loader

Inheritance:


Public Methods

ImageFile* blend(Filter3x3* filt1)
Create a new ImageFile which is a blended version of this one
int get_height()
Returns the image height.
const RGBPixel* get_image()
long get_size()
Returns the image size (in pixels)
int get_status()
Returns the error status of the loaded image.
virtual const char* get_status_mesg()
Returns a text message explaining the image status.
int get_width()
Returns the image width.
ImageFile* mipmap(int steps, Filter3x3* filt1, Filter5x5* filt2)
Create a new ImageFile which is a mipmapped version of this one
ImageFile* mipmap(int steps)
Create a new ImageFile which is a mipmapped version of this one
virtual ~ImageFile()

Protected Fields

int status
Status of the loaded image

Protected Methods

RGBPixel* get_buffer()
Get the buffer in which to write image data.
ImageFile()
ImageFile constructor
void set_dimensions(int w, int h)
Set the width and height

Private Fields

int height
Height of image.
RGBPixel* image
The image data.
int width
Width of image.

Documentation

An abstract class implementing an image loader. For every image type supported, a subclass should be created for loading that image type.
int width
Width of image.

int height
Height of image.

RGBPixel* image
The image data.

ImageFile()
ImageFile constructor. This object can only be created by an appropriate loader, which is why the constructor is protected.

int status
Status of the loaded image. (status == IFE_OK) if the image loaded correctly. (status & IFE_BadFormat) indicates that the image is in the wrong format. (status & IFE_Corrupt) indicates that the image is in the correct format, but the data is corrupt and unreadable.

void set_dimensions(int w, int h)
Set the width and height. This will also allocate the 'image' buffer to hold the bitmap.

RGBPixel* get_buffer()
Get the buffer in which to write image data.

virtual ~ImageFile()

int get_width()
Returns the image width.

int get_height()
Returns the image height.

long get_size()
Returns the image size (in pixels)

const RGBPixel* get_image()

int get_status()
Returns the error status of the loaded image.

virtual const char* get_status_mesg()
Returns a text message explaining the image status.

ImageFile* mipmap(int steps, Filter3x3* filt1, Filter5x5* filt2)
Create a new ImageFile which is a mipmapped version of this one. 'steps' indicates how much the mipmap should be scaled down. Only steps 1, 2, and 3 are supported. If 'steps' is 1 then the 3x3 filter is used. Otherwise the 5x5 filter is used. If the filters are NULL then the pixels are just averaged.

ImageFile* mipmap(int steps)
Create a new ImageFile which is a mipmapped version of this one. 'steps' indicates how much the mipmap should be scaled down. Only steps 1, 2, and 3 are supported. This version is required for transparent images. It preserves color 0 (transparent).

ImageFile* blend(Filter3x3* filt1)
Create a new ImageFile which is a blended version of this one


Direct child classes:
ImageTgaFile
ImagePngFile
ImageJpgFile
ImageGifFile
ImageBMPFile

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