Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

LsgImage Struct Reference

Bitmap. More...

#include <image.h>

Collaboration diagram for LsgImage:

Collaboration graph
[legend]

Data Fields

LsgObject super
int width
int height
int bpp
unsigned char * data

Related Functions

(Note that these are not member functions.)

LsgImageLsgImage_create (int width, int height, int bpp)
void LsgImage_init (LsgImage *self, int width, int height, int bpp)
void LsgImage_mirrorX (LsgImage *self)
void LsgImage_mirrorY (LsgImage *self)
void LsgImage_destroy (LsgImage *self)
LsgImageLsgImage_load (const char *filename)
LsgImageLsgImage_loadPCX (const char *filename)
LsgImageLsgImage_loadTGA (const char *filename)

Detailed Description

Bitmap.

A bitmap with a variable number of color channels. Every channel has a resolution of 8 bit per pixel.


Friends And Related Function Documentation

LsgImage * LsgImage_create int  width,
int  height,
int  bpp
[related]
 

Allocate and initialize an image with the given resolution and number of channels.

Parameters:
width The width of the bitmap
height The height of the bitmap
bpp The number of channels
Returns:
An image with the given width, height and number of channels

void LsgImage_init LsgImage self,
int  width,
int  height,
int  bpp
[related]
 

Constructor for LsgImage. Allocate a pixel buffer of the given dimension and resolution.

Parameters:
self The instance variable
width The image width in pixel
height The image height in pixel
bpp The image resolution in byte per pixel (number of color channels)

void LsgImage_mirrorX LsgImage self  )  [related]
 

Mirror the image horizontally.

Parameters:
self The instance variable

void LsgImage_mirrorY LsgImage self  )  [related]
 

Mirror the image vertically.

Parameters:
self The instance variable

void LsgImage_destroy LsgImage self  )  [related]
 

Destructor for LsgImage. Free the allocated pixel buffer.

Parameters:
self The instance variable

LsgImage * LsgImage_load const char *  filename  )  [related]
 

Load an image stored in any of the supported image formats (currently PCX and TGA). The apropriate loader is determined from the filename.

Parameters:
filename The name of the image file to load
Returns:
The bitmap stored in the file referenced by filename

LsgImage * LsgImage_loadPCX const char *  filename  )  [related]
 

Load an image stored in PCX format.

Parameters:
filename The name of the PCX file
Returns:
The bitmap stored in the file referenced by filename

LsgImage * LsgImage_loadTGA const char *  filename  )  [related]
 

Load an image stored in TGA format. Supported are Indexed and True Color images, either uncompressed or RLE encoded.

Parameters:
filename The name of the TGA file
Returns:
The bitmap stored in the file referenced by filename


The documentation for this struct was generated from the following file:
(c) 2003, by Enno Cramer
generated on 13 Jul 2003
lescegra - doxygen