Search by

codecs-php / codecs

FojleRabbiRabib

In-process AVIF and JPEG-XL image decoding and encoding for PHP, backed by statically linked libavif and libjxl

Package info

github.com/FojleRabbiRabib/codecs-php

Documentation

Language:C

Type:php-ext

Ext name:ext-codecs

pkg:composer/codecs-php/codecs

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-10-21 10:36 UTC

This package is auto-updated.

Last update: 2026-10-21 10:47:09 UTC


README

In-process AVIF and JPEG-XL image decoding, encoding, and header probing for PHP 8.3+, backed by statically linked builds of libavif and libjxl.

  • Self-contained single .so — vendored codec libraries linked with a symbol version script that exports only get_module; no system libavif/libjxl packages or ImageMagick/GD delegates required.
  • In-process — no shell_exec to CLI binaries, no temporary files, and no FFI runtime requirement.
  • Multi-ABI — targets PHP 8.3, 8.4, and 8.5 (PIE type: php-ext).

Requirements

  • PHP 8.3, 8.4, or 8.5 (NTS or ZTS)
  • Linux x86_64 / aarch64

Building from source

phpize
./configure --enable-codecs
make -j"$(nproc)"
php -n -d extension=modules/codecs.so --ri codecs

Quick verify

<?php

declare(strict_types=1);

var_dump(Codecs\Codec::version());

License

Apache License 2.0 — see LICENSE and NOTICE.