SDL_image for PHP allows to load images (PNG, JPG, BMP, TGA, TIF, etc.) and create SDL_Texture or SDL_Surface. It requires SDL PHP Extension.
Install with PIE (PHP Installer for Extensions):
$ pie install kea/php-sdl-imageThe SDL_image development files (e.g. libsdl2-image-dev on Debian/Ubuntu) and the SDL PHP extension must be installed first.
If SDL_image is in a non-standard location:
$ pie install kea/php-sdl-image --with-sdl_image=/opt/sdl_image$ phpize
$ ./configure --enable-sdl_image
$ make
$ make installRun tests with installed PHP (avoids skipped tests):
$ php run-tests.php --show-diff -q
Require PHP 8+ and SDL PHP extension
$ pecl install sdl-devel