SDL image

From Wikipedia, the free encyclopedia

The correct title of this article is SDL_image. The substitution or omission of an _ is due to technical restrictions.

SDL_image is a Simple DirectMedia Layer (SDL) standard library, which is used in conjunction with SDL to provide support for modern image formats. It is maintained by Sam Lantinga and Mattias EngdegÄrd, and is currently able to load the following formats: BMP, PPM, XPM, PCX, GIF, JPEG, PNG, and TGA.

This extension is necessary since the main SDL library only provides a way to load and save in the BMP format. Although SDL_image adds support for loading images, there is currently no way of saving images in any other format than the BMP.

Besides the core SDL library, SDL_image also needs the IJG, PNG, Zlib and SGI TIFF libraries for loading some of the formats.

In the C/C++ binding, SDL_image provides the function IMG_Load( const char* ) and a few variations all of which return a pointer to a SDL_Surface where the loaded image is stored.

[edit] See also

[edit] External links