images.h File Reference

Image loading and saving functions. More...

#include "ufotypes.h"
#include "byte.h"
#include "../common/filesys.h"
#include <SDL_image.h>
Include dependency graph for images.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const char ** Img_GetImageTypes (void)
qboolean Img_LoadImage (const char *name, SDL_Surface **surf)
 Loads the specified image from the game filesystem and populates the provided SDL_Surface.
void R_WriteCompressedTGA (qFILE *f, const byte *buffer, int width, int height)
void R_WritePNG (qFILE *f, byte *buffer, int width, int height)
void R_WriteJPG (qFILE *f, byte *buffer, int width, int height, int quality)

Detailed Description

Image loading and saving functions.

Definition in file images.h.


Function Documentation

const char** Img_GetImageTypes ( void   ) 

Definition at line 70 of file images.c.

References IMAGE_TYPES.

Referenced by R_ImageExists().

qboolean Img_LoadImage ( const char *  name,
SDL_Surface **  surf 
)

Loads the specified image from the game filesystem and populates the provided SDL_Surface.

Image formats are tried in the order they appear in TYPES.

Note:
Make sure to free the given SDL_Surface after you are done with it.

Definition at line 338 of file images.c.

References i, IMAGE_TYPES, Img_LoadTypedImage(), qfalse, and qtrue.

Referenced by CalcTextureReflectivity(), R_FindImage(), and R_LoadImage().

void R_WriteCompressedTGA ( qFILE f,
const byte buffer,
int  width,
int  height 
)
See also:
R_LoadTGA
R_WriteTGA

Definition at line 126 of file images.c.

References byte, FS_Write(), header, TGA_CHANNELS, and TGA_UNMAP_COMP.

Referenced by R_ScreenShot().

void R_WriteJPG ( qFILE f,
byte buffer,
int  width,
int  height,
int  quality 
)
See also:
R_ScreenShot_f
R_LoadJPG

Definition at line 252 of file images.c.

References byte, qFILE_s::f, and qtrue.

Referenced by R_ScreenShot().

void R_WritePNG ( qFILE f,
byte buffer,
int  width,
int  height 
)
See also:
R_LoadTGA
R_LoadJPG
R_FindImage

Definition at line 80 of file images.c.

References qFILE_s::f, and i.

Referenced by R_ScreenShot().


Generated by  doxygen 1.6.2