Load and store png images with easy interface.
More...
|
| unsigned char * | GfImgReadPng (const char *filename, int *widthp, int *heightp, float screen_gamma) |
| | Load an image from disk to a buffer in RGBA mode. More...
|
| |
| int | GfImgWritePng (unsigned char *img, const char *filename, int width, int height) |
| | Write a buffer to a png image on disk. More...
|
| |
| void | GfImgFreeTex (GLuint tex) |
| | Free the texture. More...
|
| |
| GLuint | GfImgReadTex (char *filename) |
| | Read a png image into a texture. More...
|
| |
Load and store png images with easy interface.
◆ GfImgFreeTex()
| void GfImgFreeTex |
( |
GLuint |
tex | ) |
|
Free the texture.
- Parameters
-
- Returns
- none
Definition at line 280 of file img.cpp.
◆ GfImgReadPng()
| 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
Definition at line 54 of file img.cpp.
◆ GfImgReadTex()
| GLuint GfImgReadTex |
( |
char * |
filename | ) |
|
Read a png image into a texture.
- Parameters
-
| filename | file name of the image |
- Returns
- None.
Definition at line 293 of file img.cpp.
◆ GfImgWritePng()
| 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
Definition at line 201 of file img.cpp.