Download the PHP package php-sdl/sdl3-image without Composer

On this page you can find all versions of the php package php-sdl/sdl3-image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdl3-image

php-sdl3-image

CI PHP SDL3 SDL3_image Built with Zephir

PHP extension for SDL3_image — image loading built with Zephir.

sdl3image wraps SDL3_image for PHP 8.2+, providing image decoding from common formats (PNG, JPG, WebP, and more) into SDL_Surface values, and texture loading into an existing SDL_Renderer.

Pair it with php-sdl/sdl3 for windowing, renderer creation, and event handling. Both extensions share the Sdl3* namespace prefix and can be loaded side-by-side.


Table of contents


Requirements

Component Minimum version Notes
PHP 8.2 ZTS and NTS builds both supported.
php-sdl/sdl3 any Required for renderer usage. Provides SDL_Renderer and other SDL3 runtime primitives.
SDL3 3.4.0 C library — must be discoverable via pkg-config sdl3.
SDL3_image 3.2 C library — must be discoverable via pkg-config SDL3_image (or sdl3-image / sdl3_image).
OS Linux / macOS Windows is not currently supported.
Compiler C11 toolchain gcc, clang, or Apple Clang.
php-dev / phpize matches PHP Required for any build path.

Tested on macOS (Apple Silicon + Intel), Debian Trixie, Raspberry Pi OS (arm64 / armhf), and NVIDIA JetPack 6 (Jetson Orin).


Installation

Via PHP PIE (recommended)

Install php-sdl/sdl3 first, then install this extension:

PIE handles the full build pipeline (phpize → configure → make → install). Make sure SDL3 >= 3.4.0 and SDL3_image >= 3.2 are already installed on the system before running.

Platform installers

Three installer scripts live at the repository root. Each one installs SDL3 and SDL3_image if needed, builds the extension with Zephir, and enables it for detected PHP SAPIs.

macOS (Homebrew):

Debian Trixie / Raspberry Pi OS (amd64, arm64, armhf):

JetPack 6 / Ubuntu 22.04 (builds SDL3 + SDL3_image from source):

Each script writes build output to ./build.log and prints concise diagnostics on failure.

Manual build with phpize

If generated C source exists in ext/, build without Zephir:

Then enable the extension:

If SDL3 or SDL3_image is installed in a non-standard prefix, export PKG_CONFIG_PATH before ./configure.


Verifying the install

One-liner sanity check:

Expected output:


Quick start

If you already have an SDL_Renderer pointer from php-sdl/sdl3, you can load directly into a texture via IMG::IMGLoadTexture($rendererPtr, $file).


API reference

All methods live on:

Sdl3image\SDLImage\IMG

IMGLoad(string $file): array

Loads an image file and returns an associative array describing an SDL_Surface.

Returns [] on failure.

IMGLoadTexture(int $renderer, string $file): array

Loads an image into an SDL_Texture for the given renderer pointer.


Companion extension

This extension focuses on image decoding/loading. For window creation, input, rendering, and the rest of SDL3, install php-sdl/sdl3 alongside it.

Both extensions can be loaded simultaneously with separate module names (sdl3 and sdl3image) and no conflict.


License

MIT © Project Saturn Studios, LLC.


All versions of sdl3-image with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-sdl/sdl3-image contains the following files

Loading the files please wait ...