Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GD - AVIF image support is enabled, yet imagecreatefromavif() does not run because AVIF image support is disabled #12197

Closed
alexscott64 opened this issue Sep 12, 2023 · 3 comments

Comments

@alexscott64
Copy link

Description

I have this issue over here, but I thought I would create an issue here because it seems like this is more source code based, rather than compilation based.

PHP 8.2 has the GD extension enabled (2.3.3), with AVIF support confirmed (libavif v0.9.3-3) through phpinfo() and gd_info(). However running the following code:

$gd_image = imagecreatefromavif($image_path);

Results in the warning: Warning: imagecreatefromavif(): AVIF image support has been disabled

Obviously the expected output when AVIF support is enabled is for the function to work properly.

PHP Version

PHP 8.2

Operating System

Ubuntu 22.04

@devnexen
Copy link
Member

Seems somewhat related to this issue.

@MickenCZ
Copy link

@alexscott64 I just tested this with PHP 8.2 (8.2.15 in particular) on Ubuntu 22.04 with GD version 2.3.3
My code:

$im = imagecreatefromavif("example.avif");
$size = min(imagesx($im), imagesy($im));
$im2 = imagecrop($im, ['x' => 100, 'y' => 0, 'width' => $size, 'height' => $size]);
if ($im2 !== FALSE) {
    imageavif($im2, 'example-cropped.avif');
    imagedestroy($im2);
}
imagedestroy($im);

Can you still recreate your issue? I feel like it is fixed, we could consider closing it.

Copy link

No feedback was provided. The issue is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so. Thank you.

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

No branches or pull requests

5 participants