README-SDL_image.txt 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. SDL_image 2.0
  2. The latest version of this library is available from:
  3. http://www.libsdl.org/projects/SDL_image/
  4. This is a simple library to load images of various formats as SDL surfaces.
  5. This library supports BMP, PNM (PPM/PGM/PBM), XPM, LBM, PCX, GIF, JPEG, PNG,
  6. TGA, and TIFF formats.
  7. API:
  8. #include "SDL_image.h"
  9. SDL_Surface *IMG_Load(const char *file);
  10. or
  11. SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc);
  12. or
  13. SDL_Surface *IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, char *type);
  14. where type is a string specifying the format (i.e. "PNG" or "pcx").
  15. Note that IMG_Load_RW cannot load TGA images.
  16. To create a surface from an XPM image included in C source, use:
  17. SDL_Surface *IMG_ReadXPMFromArray(char **xpm);
  18. An example program 'showimage' is included, with source in showimage.c
  19. JPEG support requires the JPEG library: http://www.ijg.org/
  20. PNG support requires the PNG library: http://www.libpng.org/pub/png/libpng.html
  21. and the Zlib library: http://www.gzip.org/zlib/
  22. TIFF support requires the TIFF library: ftp://ftp.sgi.com/graphics/tiff/
  23. If you have these libraries installed in non-standard places, you can
  24. try adding those paths to the configure script, e.g.
  25. sh ./configure CPPFLAGS="-I/somewhere/include" LDFLAGS="-L/somewhere/lib"
  26. If this works, you may need to add /somewhere/lib to your LD_LIBRARY_PATH
  27. so shared library loading works correctly.
  28. This library is under the zlib License, see the file "COPYING.txt" for details.