[php-src] Issue #13919: AVIF image errors
| From: | ve3 | Date: | Tue, 09 Apr 2024 07:41:36 +0000 |
| Subject: | [php-src] Issue #13919: AVIF image errors | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246726@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/13919
Author: ve3
### Description
The following code:
```php
<?php
$image = imagecreatefromavif('image.avif');
```
Resulted in this output:
There are different errors.
If you downloaded image from https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Apple/multilayer_examples
where file name is
[animals_00_multilayer_a1lx.avif](https://github.com/AOMediaCodec/av1-avif/blob/master/testFiles/Apple/multilayer_examples/animals_00_multilayer_a1lx.avif)
The result will be:
```
Warning: imagecreatefromavif(): avif error - Could not parse image: No AV1 items found
```
If you downloaded image file name
[animals_00_multilayer_grid_a1lx.avif](https://github.com/AOMediaCodec/av1-avif/blob/master/testFiles/Apple/multilayer_examples/animals_00_multilayer_grid_a1lx.avif)
The result will be:
```
Warning: imagecreatefromavif(): avif error - Could not parse image: Invalid image grid
```
If you downloaded image file name
[animals_00_singlelayer.avif](https://github.com/AOMediaCodec/av1-avif/blob/master/testFiles/Apple/multilayer_examples/animals_00_singlelayer.avif)
The result will be:
```
Notice: imagecreatefromavif(): Image's color profile is not sRGB
```
But I expected this output instead:
```php
\GdImage
```
### PHP Version
PHP 8.3.1
### Operating System
Windows 11 x64