Bug #77943 [Csd]: imageantialias($image, false); does not work

From: Date: Tue, 30 Apr 2019 08:15:56 +0000
Subject: Bug #77943 [Csd]: imageantialias($image, false); does not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220660@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77943&edit=1 ID: 77943 User updated by: andrew dot moyns at sanofi dot com Reported by: andrew dot moyns at sanofi dot com Summary: imageantialias($image, false); does not work Status: Closed Type: Bug Package: GD related Operating System: Windows PHP Version: 7.3.4 Assigned To: cmb Block user comment: N Private report: N New Comment: That's great, many thanks for the quick response. Hope to see it in a new release soon! Previous Comments: ------------------------------------------------------------------------ [2019-04-29 15:25:31] cmb@php.net Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=18a9ae412f00cc1e312c296952fac24f16b4d4de Log: Fix #77943: imageantialias($image, false); does not work ------------------------------------------------------------------------ [2019-04-29 14:20:07] cmb@php.net Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=cd94cf60a2379ccfe4619b1b9384a68b3e7a1205 Log: Fix #77943: imageantialias($image, false); does not work ------------------------------------------------------------------------ [2019-04-25 12:50:14] cmb@php.net Thanks for reporting. Indeed, this is broken as of PHP 7.2.0[1]. (Not calling imageantialias() would work around the problem for your code.) [1] <http://git.php.net/?p=php-src.git;a=commit;h=d0f14a4429e36d8cb70d14067e79fd252eb4ee7a> ------------------------------------------------------------------------ [2019-04-25 10:56:23] andrew dot moyns at sanofi dot com Description: ------------ PHP 7.3.4 nts 64bit Unable to turn off antialiasing for an image, resulting in inability to draw lines with thickness > 1 Expected operation is observed in PHP 5.5.38 Test script: --------------- <?php header('Cache-Control: no-cache'); header('Content-type: image/png'); $width = 400; $height = 300; $im = imagecreatetruecolor($width, $height); $white = imagecolorallocate($im, 255, 255, 255); $blue = imagecolorallocate($im, 0, 0, 255); imageantialias($im, false); imagefilledrectangle($im, 0, 0, $width-1, $height-1, $white); imageline($im, 0, 0, $width, $height, $blue); imagesetthickness($im, 3); imageline($im, 10, 0, $width, $height-10, $blue); imagepng($im); ?> Expected result: ---------------- PNG image showing two blue lines, not antialiased, one 1 pixel wide, one 3 pixels wide Actual result: -------------- PNG image showing two blue lines, antialiased, both 1 pixel wide. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77943&edit=1

« previous php.bugs (#220660) next »