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

From: Date: Sat, 26 Feb 2022 02:14:40 +0000
Subject: [php-src] Issue #8154: AVIF with imagecopyresampled very bad quality
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240038@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8154 Comment Author: pierrejoye good morning, this is not something that GD control. AVIF is based on video encoding and compression and can be very destructive (used mainly with photographiesl). As you mentioned, other codec provides better results. The use of palette, or other unrelated functions does not help here. You may try to increase the quality (there is a lossless model). also play with the avif console tool to test may help. On Sat, Feb 26, 2022, 3:27 AM Benji Frugoni ***@***.***> wrote: > Description > > The following code: > > > 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 > > — > Reply to this email directly, view it on GitHub > <https://github.com/php/php-src/issues/8154>, or > unsubscribe > > <https://github.com/notifications/unsubscribe-auth/AACE6KESJFY7E52DDXU6H3DU47Q2DANCNFSM5PLG35EQ> > . > Triage notifications on the go with GitHub Mobile for iOS > > <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> > or Android > > <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. > > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >

« previous php.bugs (#240038) next »