image.h File Reference

This file represents an Image. More...

Go to the source code of this file.

Classes

struct  Bcolor
struct  CMap
struct  Image

Typedefs

typedef unsigned char Byte

Functions

Imageimg_create (int type, int w, int h)
 Creates a new image.
void img_clear (Image *i, Color c)
 Clears an image with a color.
Imageimg_read (char *fname)
 Reads a ras file and creates an image from it.
void img_write (Image *i, char *fname, int cflag)
 Writes a ras file from an Image.
void img_puti (Image *i, int u, int v, int c)
 Sets a pixel on the image.
int img_geti (Image *i, int u, int v)
 Gets a pixel on the image.
void img_putc (Image *i, int u, int v, Color c)
 Sets a pixel on the image using Color.
Color img_getc (Image *i, int u, int v)
 Gets the Color of a pixel on the image.
void img_free (Image *i)
 Frees an image.
void cmap_read (CMap *m, int maplength, int fd)


Detailed Description

This file represents an Image.


Typedef Documentation

typedef unsigned char Byte


Function Documentation

void cmap_read ( CMap m,
int  maplength,
int  fd 
)

void img_clear ( Image i,
Color  c 
)

Clears an image with a color.

Parameters:
i The image to clear
c The color to fill.

Image* img_create ( int  type,
int  w,
int  h 
)

Creates a new image.

Parameters:
type The Image type: IMG_TRUECOL, IMG_MAPPCOL, IMG_MONOCOL.
w The Image width.
h The Image height.
Returns:
The Image.

void img_free ( Image i  ) 

Frees an image.

Color img_getc ( Image i,
int  u,
int  v 
)

Gets the Color of a pixel on the image.

int img_geti ( Image i,
int  u,
int  v 
)

Gets a pixel on the image.

void img_putc ( Image i,
int  u,
int  v,
Color  c 
)

Sets a pixel on the image using Color.

void img_puti ( Image i,
int  u,
int  v,
int  c 
)

Sets a pixel on the image.

Image* img_read ( char *  fname  ) 

Reads a ras file and creates an image from it.

Parameters:
fname The file to read
Returns:
The image.

void img_write ( Image i,
char *  fname,
int  cflag 
)

Writes a ras file from an Image.

Parameters:
i The Image to write
fname The file name
cflag The ras flag


Generated on Tue Jan 22 17:07:30 2008 for MUAN by  doxygen 1.4.7