Bug #73281 [Opn->Csd]: imagescale(…, IMG_BILINEAR_FIXED) can cause black border

From: Date: Thu, 10 Jan 2019 15:29:49 +0000
Subject: Bug #73281 [Opn->Csd]: imagescale(…, IMG_BILINEAR_FIXED) can cause black border
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218885@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73281&edit=1 ID: 73281 Updated by: cmb@php.net Reported by: cmb@php.net Summary: imagescale(…, IMG_BILINEAR_FIXED) can cause black border -Status: Open +Status: Closed Type: Bug Package: GD related Operating System: * PHP Version: master-Git-2016-10-10 (Git) Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=6b4cdbaade1b077e8f0eceecb0e07921fed00aff Log: Fix #73281: imagescale(…, IMG_BILINEAR_FIXED) can cause black border Previous Comments: ------------------------------------------------------------------------ [2016-10-10 11:07:29] cmb@php.net Description: ------------ When upscaling a completely white image with the interpolation method IMG_BILINEAR_FIXED, the resulting image has a black border at the bottom. This has been reported against upstream libgd[1], but as PHP's bundled libgd is also affected, I'm forwarding. [1] <https://github.com/libgd/libgd/issues/329> Test script: --------------- <?php $src = imagecreatetruecolor(100, 100); $expected = 0xffffff; imagefilledrectangle($src, 0,0, 99,99, $expected); $dst = imagescale($src, 200, 200, IMG_BILINEAR_FIXED); printf("color: %x", imagecolorat($dst, 199, 199)); Expected result: ---------------- color: ffffff Actual result: -------------- color: 5f7f7f7f ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73281&edit=1

« previous php.bugs (#218885) next »