Go to file
Sam Lantinga 1df59ea517 Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:35:28 -07:00
.github cmake: disable documentation installation by default 2024-05-02 19:56:26 +02:00
VisualC Updated for SDL3 version changes 2024-05-15 12:34:27 -07:00
VisualC-WinRT project: move SDL_image.h into SDL3_image subfolder 2023-08-04 14:46:37 +02:00
Xcode Updated for SDL3 version changes 2024-05-15 12:34:27 -07:00
build-scripts wikiheaders: Updated to latest from SDL3. 2024-05-16 11:43:00 -04:00
cmake cmake: add link dependency on symbol version script 2024-05-15 23:06:04 +02:00
docs Updated for SDL3 version changes 2024-05-15 12:34:27 -07:00
examples Updated to the latest version of SDL 2024-05-14 08:43:38 -07:00
external Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:35:28 -07:00
include/SDL3_image Renamed DECLSPEC to SDL_DECLSPEC 2024-05-17 17:32:31 -07:00
mingw/pkg-support/cmake dist: fix cmake config scripts for distributables 2023-01-06 19:12:52 +01:00
src fix IMG_Version symbol name in SDL_image.sym 2024-05-15 23:56:24 +03:00
test remove most of SDL_OutOfMemory() calls where SDL is the allocator. 2024-05-08 20:01:04 +03:00
.clang-format Updated .editorconfig and added .clang-format for SDL_image 2023-07-03 07:29:18 -07:00
.editorconfig Updated .editorconfig and added .clang-format for SDL_image 2023-07-03 07:29:18 -07:00
.gitignore Updated SDL_image to SDL 3.0 2023-01-04 22:49:35 -08:00
.gitmodules upgrade vendored libjpeg to version 9f. 2024-04-20 01:01:02 +03:00
.wikiheaders-options Updated for SDL3 version changes 2024-05-15 12:34:27 -07:00
Android.mk Android.mk: remove the subdirectory from public header include path 2023-09-30 17:55:40 +03:00
CHANGES.txt Updated for the SDL3 RW -> IO changes 2024-03-18 14:30:18 -07:00
CMakeLists.txt cmake: disable documentation installation by default 2024-05-02 19:56:26 +02:00
LICENSE.txt Updated copyright for 2024 2024-01-01 13:21:16 -08:00
README.txt Updated for the SDL3 RW -> IO changes 2024-03-18 14:30:18 -07:00

README.txt

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.


SDL_image 3.0

The latest version of this library is available from GitHub:
https://github.com/libsdl-org/SDL_image/releases

This is a simple library to load images of various formats as SDL surfaces.
It can load BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PPM/PGM/PBM), QOI, TGA, XCF, XPM, and simple SVG format images. It can also load AVIF, JPEG-XL, TIFF, and WebP images, depending on build options (see the note below for details.)

API:
#include <SDL3_image/SDL_image.h>

	SDL_Surface *IMG_Load(const char *file);
or
	SDL_Surface *IMG_Load_IO(SDL_IOStream *src, SDL_bool closeio);
or
	SDL_Surface *IMG_LoadTyped_IO(SDL_IOStream *src, SDL_bool closeio, char *type);

where type is a string specifying the format (i.e. "PNG" or "pcx").
Note that IMG_Load_IO 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 examples/showimage.c

Documentation is also available online at https://wiki.libsdl.org/SDL_image

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

Note:
Support for AVIF, JPEG-XL, TIFF, and WebP are not included by default because of the size of the decode libraries, but you can get them by running external/download.sh
- When building with CMake, you can enable the appropriate SDL3IMAGE_* options defined in CMakeLists.txt. SDL3IMAGE_VENDORED allows switching between system and vendored libraries.
- When building with configure/make, you can build and install them normally and the configure script will detect and use them.
- When building with Visual Studio, you will need to build the libraries and then add the appropriate LOAD_* preprocessor define to the Visual Studio project.
- When building with Xcode, you can edit the config at the top of the project to enable them, and you will need to include the appropriate framework in your application.
- For Android, you can edit the config at the top of Android.mk to enable them.