Skip to content

Unofficial mirror of hg.libsdl.org/SDL_image. Updated daily.

License

Notifications You must be signed in to change notification settings

bminor/SDL_image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

60db837 · Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Nov 13, 2018
Dec 8, 2019
Jun 19, 2019
Jan 2, 2021
Dec 23, 2020
Sep 12, 2017
Jul 2, 2019
Sep 18, 2020
Nov 1, 2020
Sep 18, 2020
Jan 2, 2021
Jan 2, 2021
Dec 13, 2017
May 22, 2013
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021
Oct 16, 2020
Jun 10, 2019
Nov 5, 2019
Jan 28, 2012
Nov 5, 2019
Nov 5, 2019
Jan 2, 2021
Dec 7, 2020
Jul 13, 2007
Dec 7, 2020
Jun 19, 2019
Jun 19, 2019
Nov 5, 2019
Nov 5, 2019
Dec 7, 2020
Jun 1, 2013
Dec 7, 2020
Jun 19, 2019
Nov 5, 2019
Dec 7, 2020
Oct 30, 2019
Oct 5, 2019
Jan 2, 2021
Jan 2, 2021
Jan 2, 2021

Repository files navigation

SDL_image 2.0

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, TIFF, and simple SVG 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/
    and the Zlib library: http://www.gzip.org/zlib/

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.txt" for details.