GithubHelp home page GithubHelp logo

sarvex / sdl_image Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libsdl-org/sdl_image

0.0 1.0 0.0 64.89 MB

Image decoding for many popular formats for Simple Directmedia Layer.

License: zlib License

Shell 0.23% C 98.45% Objective-C 0.59% Makefile 0.03% CMake 0.70%

sdl_image's Introduction

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/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

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.

sdl_image's People

Contributors

slouken avatar sezero avatar madebr avatar smcv avatar icculus avatar 1bsyl avatar davidludwig avatar sdlwikibot avatar ferzkopp avatar ccawley2011 avatar flibitijibibo avatar janisozaur avatar miniupnp avatar alprabbit avatar eliasdaler avatar ankith26 avatar llmike avatar pmandin avatar gsathya avatar starbuck5 avatar truecat17 avatar gliheng avatar akk0rd87 avatar kambala-decapitator avatar codekitchen avatar cgutman avatar daft-freak avatar cgohlke avatar crvarner avatar markand avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.