Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 1.56 KB

README

File metadata and controls

42 lines (30 loc) · 1.56 KB
 
Aug 10, 2000
Aug 10, 2000
1
Apr 6, 2001
Apr 6, 2001
2
SDL_image 1.2
Aug 10, 2000
Aug 10, 2000
3
4
The latest version of this library is available from:
Apr 6, 2001
Apr 6, 2001
5
http://www.libsdl.org/projects/SDL_image/
Aug 10, 2000
Aug 10, 2000
6
7
This is a simple library to load images of various formats as SDL surfaces.
Sep 23, 2001
Sep 23, 2001
8
This library supports BMP, PNM (PPM/PGM/PBM), XPM, LBM, PCX, GIF, JPEG, PNG,
Mar 7, 2001
Mar 7, 2001
9
TGA, and TIFF formats.
Aug 10, 2000
Aug 10, 2000
10
11
12
13
14
15
16
17
API:
#include "SDL_image.h"
SDL_Surface *IMG_Load(const char *file);
or
SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc);
or
Nov 29, 2000
Nov 29, 2000
18
SDL_Surface *IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, char *type);
Aug 10, 2000
Aug 10, 2000
19
20
21
22
where type is a string specifying the format (i.e. "PNG" or "pcx").
Note that IMG_Load_RW cannot load TGA images.
Apr 28, 2001
Apr 28, 2001
23
24
25
26
To create a surface from an XPM image included in C source, use:
SDL_Surface *IMG_ReadXPMFromArray(char **xpm);
Aug 10, 2000
Aug 10, 2000
27
28
29
An example program 'showimage' is included, with source in showimage.c
JPEG support requires the JPEG library: http://www.ijg.org/
Dec 14, 2001
Dec 14, 2001
30
31
PNG support requires the PNG library: http://www.libpng.org/pub/png/libpng.html
and the Zlib library: http://www.gzip.org/zlib/
Aug 10, 2000
Aug 10, 2000
32
33
TIFF support requires the TIFF library: ftp://ftp.sgi.com/graphics/tiff/
Jul 18, 2007
Jul 18, 2007
34
35
36
37
38
39
If you have these libraries installed in non-standard places, you can
try adding those paths to the configure script, e.g.
sh ./configure CPPFLAGS="-I/somewhere/include" LDFLAGS="-L/somewhere/lib"
If this works, you may need to add /somewhere/lib to your LD_LIBRARY_PATH
so shared library loading works correctly.
Aug 10, 2000
Aug 10, 2000
40
41
42
This library is under the GNU Library General Public License, see the file
"COPYING" for details. Certain image loaders may be under a different
license, see the individual image loader source files for details.