README
author Thomas Bernard <miniupnp@free.fr>
Fri, 30 Nov 2018 11:04:15 +0100
branchSDL-1.2
changeset 634 68f958f43339
parent 281 bcdf362c177c
permissions -rw-r--r--
IMG_xcf.c: Avoid infinite loop in read_xcf_header()
slouken@0
     1
slouken@34
     2
SDL_image 1.2
slouken@0
     3
slouken@0
     4
The latest version of this library is available from:
slouken@34
     5
http://www.libsdl.org/projects/SDL_image/
slouken@0
     6
slouken@0
     7
This is a simple library to load images of various formats as SDL surfaces.
slouken@45
     8
This library supports BMP, PNM (PPM/PGM/PBM), XPM, LBM, PCX, GIF, JPEG, PNG,
slouken@24
     9
TGA, and TIFF formats.
slouken@0
    10
slouken@0
    11
API:
slouken@0
    12
#include "SDL_image.h"
slouken@0
    13
slouken@0
    14
	SDL_Surface *IMG_Load(const char *file);
slouken@0
    15
or
slouken@0
    16
	SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc);
slouken@0
    17
or
slouken@8
    18
	SDL_Surface *IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, char *type);
slouken@0
    19
slouken@0
    20
where type is a string specifying the format (i.e. "PNG" or "pcx").
slouken@0
    21
Note that IMG_Load_RW cannot load TGA images.
slouken@0
    22
slouken@35
    23
To create a surface from an XPM image included in C source, use:
slouken@35
    24
slouken@35
    25
	SDL_Surface *IMG_ReadXPMFromArray(char **xpm);
slouken@35
    26
slouken@0
    27
An example program 'showimage' is included, with source in showimage.c
slouken@0
    28
slouken@0
    29
JPEG support requires the JPEG library: http://www.ijg.org/
slouken@52
    30
PNG support requires the PNG library: http://www.libpng.org/pub/png/libpng.html
slouken@52
    31
    and the Zlib library: http://www.gzip.org/zlib/
slouken@0
    32
TIFF support requires the TIFF library: ftp://ftp.sgi.com/graphics/tiff/
slouken@0
    33
slouken@168
    34
If you have these libraries installed in non-standard places, you can
slouken@168
    35
try adding those paths to the configure script, e.g.
slouken@168
    36
sh ./configure CPPFLAGS="-I/somewhere/include" LDFLAGS="-L/somewhere/lib"
slouken@168
    37
If this works, you may need to add /somewhere/lib to your LD_LIBRARY_PATH
slouken@168
    38
so shared library loading works correctly.
slouken@168
    39
slouken@281
    40
This library is under the zlib License, see the file "COPYING" for details.