aboutsummaryrefslogtreecommitdiff
path: root/graphics/sdl_image/pkg-descr
blob: e8f0cce96677264c7d3a61089bea8ec9a7340907 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
This is a simple library to load images of various formats as SDL surfaces.
This library supports BMP, PPM, PCX, GIF, JPEG, PNG, TGA, and TIFF formats.

API:
#include "SDL_image.h"

	SDL_Surface *IMG_Load(const char *file);
or
	SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc);
or
	SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc, char *type);

where type is a string specifying the format (i.e. "PNG" or "pcx").
Note that IMG_Load_RW cannot load TGA images.

An example program 'showimage' is included, with source in showimage.c