mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
c5a4db7c11
A set of new SDL2 related ports has been added, which are essentially the same as their corresponding port for SDL1.2: audio/sdl2_mixer graphics/sdl2_image graphics/sdl2_ttf net/sdl2_net A set of new USE_SDL knobs is available to enable SDL2 and its related ports to be added as dependency to ports. Use either of USE_SDL= sdl2 image2 mixer2 net2 ttf2 to pull in the specific sdl2_* or sdl20 port.
19 lines
589 B
Plaintext
19 lines
589 B
Plaintext
This is a simple library to load images of various formats as SDL surfaces.
|
|
This library supports BMP, PPM, 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_Load_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.
|
|
|
|
An example program 'showimage' is included, with source in showimage.c
|
|
|
|
WWW: http://www.libsdl.org/projects/SDL_image/
|