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