Skip to content

imagick: install libheif-plugin-aomenc on Debian 13+ for AVIF support#1275

Merged
mlocati merged 1 commit intomlocati:masterfrom
lenlorijn:imagick-debian13-liboam
Apr 22, 2026
Merged

imagick: install libheif-plugin-aomenc on Debian 13+ for AVIF support#1275
mlocati merged 1 commit intomlocati:masterfrom
lenlorijn:imagick-debian13-liboam

Conversation

@lenlorijn
Copy link
Copy Markdown
Contributor

On Debian 13 the libheif1 codecs were split into separate plugin packages, so imagick images no longer include an AV1 encoder and ImageMagick can't write AVIF. This adds libheif-plugin-aomenc on Debian 13+; bookworm and Alpine are unaffected afaik.

Test: imagick

Debian 13 split libheif's codec plugins out into separate packages,
so ImageMagick can no longer encode AVIF unless one of them is
installed.

Test: imagick
@mlocati
Copy link
Copy Markdown
Owner

mlocati commented Apr 21, 2026

Do you know any quick way to check if imagick can write AVIF? It seems that Imagick::queryFormats() includes 'AVIF' even on debian 13+ without libheif-plugin-aomenc...

@lenlorijn
Copy link
Copy Markdown
Contributor Author

Yes no problem. The platform check we use uses the following code:

try {
    $imagick = new Imagick();
    $imagick->newImage(10, 10, new ImagickPixel('red'));
    $imagick->setImageFormat('avif');
    $writeBytes = strlen($imagick->getImageBlob());
    $imagick->clear();
} catch (\Throwable $e) {
    $writeError = $e->getMessage();
}

The version string should also have changed I believe.

$versionString = (new Imagick())->getVersion()['versionString'] ?? '';
$hasAom = stripos($versionString, 'aom') !== false;

@mlocati
Copy link
Copy Markdown
Owner

mlocati commented Apr 22, 2026

Thanks!

@mlocati mlocati merged commit a658c3a into mlocati:master Apr 22, 2026
66 checks passed
@mlocati
Copy link
Copy Markdown
Owner

mlocati commented Apr 22, 2026

In #1277 we also check for write support, and indeed this #1275 fixes the issue: compare

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants