torcs - 1.2.2

Image Management.


Detailed Description

Load and store png images with easy interface.


Files

file  img.cpp
 Images manipulation tools.


Functions

unsigned char * GfImgReadPng (const char *filename, int *widthp, int *heightp, float screen_gamma)
 Load an image from disk to a buffer in RGBA mode.

int GfImgWritePng (unsigned char *img, const char *filename, int width, int height)
 Write a buffer to a png image on disk.

void GfImgFreeTex (GLuint tex)
 Free the texture.

GLuint GfImgReadTex (char *filename)
 Read a png image into a texture.


Function Documentation

void GfImgFreeTex GLuint  tex  ) 
 

Free the texture.

Parameters:
tex texture to free
Returns:
none

unsigned char* GfImgReadPng const char *  filename,
int *  widthp,
int *  heightp,
float  screen_gamma
 

Load an image from disk to a buffer in RGBA mode.

Parameters:
filename name of the image to load
widthp width of the read image
heightp height of the read image
screen_gamma gamma correction value
Returns:
Pointer on the buffer containing the image
NULL Error

GLuint GfImgReadTex char *  filename  ) 
 

Read a png image into a texture.

Parameters:
filename file name of the image
Returns:
None.

Here is the call graph for this function:

int GfImgWritePng unsigned char *  img,
const char *  filename,
int  width,
int  height
 

Write a buffer to a png image on disk.

Parameters:
img image data (RGB)
filename filename of the png file
width width of the image
height height of the image
Returns:
0 Ok
-1 Error

Here is the call graph for this function:


Generated at Thu Feb 26 21:54:22 2004 for torcs by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-1999
TORCS © Eric Espié 1999, 2002.