[php-src] Issue #8154: AVIF with imagecopyresampled very bad quality

From: 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: ``` ![DFHX1](https://user-images.githubusercontent.com/11628948/155796297-5975eb42-6758-4f42-a5a2-2e6e97647855.png) ``` But I expected this output instead: ``` ![kcy5r](https://user-images.githubusercontent.com/11628948/155796316-11e1c15f-7c6a-42b1-a1a6-0d7e4260a6d1.png) ``` 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

« previous php.bugs (#240035) next »