[Bug 1669734] Re: Quality decrease in libgd3 with upgrade to 2.1.1-4ubuntu0.16.04.5

Pedro de Oliveira 1669734 at bugs.launchpad.net
Fri Oct 30 17:51:50 UTC 2020


Hi, I've been digging for this bug for a few weeks now.

The first report of it is from ... 2008, in php.net:
https://bugs.php.net/bug.php?id=45030

But it was fixed, because the same code on another distribution (in my
case Gentoo) doesn't happen.

Can anyone look into this bug? This issue has been open since 2017 and
it still exists on the latest version of PHP 7.4 on Ubuntu 20.


** Bug watch added: bugs.php.net/ #45030
   http://bugs.php.net/bug.php?id=45030

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to libgd2 in Ubuntu.
https://bugs.launchpad.net/bugs/1669734

Title:
  Quality decrease in libgd3 with upgrade to 2.1.1-4ubuntu0.16.04.5

Status in libgd2 package in Ubuntu:
  Confirmed

Bug description:
  Hello,

  I use GD for resizing/branding images in PHP.
  Everything worked fine with libgd3 <= 2.1.1-4build2

  Since libgd3=2.1.1-4ubuntu0.16.04.5 there is a strange behavior when resizing transparent images with imagecopyresampled and putting them on a background.
  A simple code example:

  <?php
  $outImage = imagecreatetruecolor(200, 200);

  $color = imagecolorallocate($outImage, 233, 224, 218);
  imagefilledrectangle($outImage, 0, 0, imagesx($outImage), imagesy($outImage), $color);

  $im = imagecreatefrompng('https://www.expert24.com/200x.png');

  imagecopyresampled($outImage, $im, 50, 25, 0, 0, imagesx($outImage) -
  100, imagesy($outImage) - 50, imagesx($im), imagesy($im));

  imagepng($im);
  ?>

  
  With 2.1.1-4build2 everything looks fine but with newer versions there are stripes of a little darker color in the area of the transparent pixels of the overlayed image.

  The version of php-gd or the php version itself (5.6, 7.0 from main or
  ondrej-ppa) doesn't have any influence.

  The ubuntu changelog only says that there were some security fixes.

  Is there a workaround?

  
  regards
  Ewald Stangl

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libgd2/+bug/1669734/+subscriptions



More information about the foundations-bugs mailing list