This is a simple library to load images of various formats as SDL surfaces.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Andreas Peters 312e1fdb6d first in 4 months ago
VisualC first in 4 months ago
VisualCE first in 4 months ago
Xcode first in 4 months ago
Xcode-iOS/SDL_image.xcodeproj first in 4 months ago
acinclude first in 4 months ago
confn50nyG first in 4 months ago
external first in 4 months ago
.gitignore first in 4 months ago
.hgignore first in 4 months ago
.hgtags first in 4 months ago
Android.mk first in 4 months ago
CHANGES first in 4 months ago
COPYING first in 4 months ago
IMG.c first in 4 months ago
IMG_ImageIO.m first in 4 months ago
IMG_UIImage.m first in 4 months ago
IMG_bmp.c first in 4 months ago
IMG_gif.c first in 4 months ago
IMG_jpg.c first in 4 months ago
IMG_lbm.c first in 4 months ago
IMG_pcx.c first in 4 months ago
IMG_png.c first in 4 months ago
IMG_pnm.c first in 4 months ago
IMG_tga.c first in 4 months ago
IMG_tif.c first in 4 months ago
IMG_webp.c first in 4 months ago
IMG_xcf.c first in 4 months ago
IMG_xpm.c first in 4 months ago
IMG_xv.c first in 4 months ago
IMG_xxx.c first in 4 months ago
MPWmake.sea.bin first in 4 months ago
Makefile.am first in 4 months ago
README first in 4 months ago
SDL_image.h first in 4 months ago
SDL_image.pc first in 4 months ago
SDL_image.pc.in first in 4 months ago
SDL_image.spec first in 4 months ago
SDL_image.spec.in first in 4 months ago
Watcom-OS2.zip first in 4 months ago
autogen.sh first in 4 months ago
configure.in first in 4 months ago
gcc-fat.sh first in 4 months ago
showimage.c first in 4 months ago
showimage.map first in 4 months ago
version.rc first in 4 months ago

README


SDL_image 1.2

The latest version of this library is available from:
http://www.libsdl.org/projects/SDL_image/

This is a simple library to load images of various formats as SDL surfaces.
This library supports BMP, PNM (PPM/PGM/PBM), XPM, LBM, 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_LoadTyped_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.

To create a surface from an XPM image included in C source, use:

SDL_Surface *IMG_ReadXPMFromArray(char **xpm);

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

JPEG support requires the JPEG library: http://www.ijg.org/
PNG support requires the PNG library: http://www.libpng.org/pub/png/libpng.html
and the Zlib library: http://www.gzip.org/zlib/
TIFF support requires the TIFF library: ftp://ftp.sgi.com/graphics/tiff/

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.

This library is under the zlib License, see the file "COPYING" for details.