[php-src] Issue #8154: AVIF with imagecopyresampled very bad quality
| From: | BenjiFrugoni | Date: | Fri, 25 Feb 2022 20:28:31 +0000 |
| Subject: | [php-src] Issue #8154: AVIF with imagecopyresampled very bad quality | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240035@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8154
Author: BenjiFrugoni
### Description
The following code:
```php
list($width,$height)=getimagesize("test.jpg");
$tmp1=imagecreatetruecolor(500,500);
imagecopyresampled($tmp1,$src,0,0,0,0,500,500,$width,$height);
imageavif($tmp1,"test.avif","70");
<?php
```
Resulted in this output:
```

```
But I expected this output instead:
```

```
As you can see, the image degradation is... astounding.
No matter what functions i use beforehand (imagepalettetotruecolor, imagealphablending,
imagesavealpha, imagesetinterpolation, imageantialias...) to enhace it, the result is always this
poor.
Any suggestions? Is there something wrong with GD2 itself?
### PHP Version
PHP 8.1.3
### Operating System
Windows 10 x64