UFO: Alien Invasion
Loading...
Searching...
No Matches
images.h File Reference

Image loading and saving functions. More...

#include "ufotypes.h"
#include "../common/filesys.h"
#include <SDL_video.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

char const *const * Img_GetImageTypes (void)
SDL_Surface * Img_LoadImage (char const *name)
 Loads the specified image from the game filesystem into an 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

◆ Img_GetImageTypes()

char const *const * Img_GetImageTypes ( void )

Definition at line 56 of file images.cpp.

References IMAGE_TYPES.

Referenced by R_ImageExists().

◆ Img_LoadImage()

SDL_Surface * Img_LoadImage ( char const * name)

Loads the specified image from the game filesystem into an 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 488 of file images.cpp.

References Img_LoadJPG(), Img_LoadPNG(), and name.

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

◆ R_WriteCompressedTGA()

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

Definition at line 111 of file images.cpp.

References f, FS_Write(), index, OBJZERO, TGA_CHANNELS, and TGA_UNMAP_COMP.

Referenced by R_ScreenShot().

◆ R_WriteJPG()

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

Definition at line 234 of file images.cpp.

References f.

Referenced by R_ScreenShot().

◆ R_WritePNG()

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

Definition at line 66 of file images.cpp.

References f, and i.

Referenced by R_ScreenShot().