Bug #34020 [Asn->Csd]: ImagePolygon draws broken lines when using Antialiasing

From: Date: Wed, 15 Apr 2015 13:29:40 +0000
Subject: Bug #34020 [Asn->Csd]: ImagePolygon draws broken lines when using Antialiasing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192097@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=34020&edit=1

 ID:                 34020
 Updated by:         cmb@php.net
 Reported by:        yorick at gmx dot ch
 Summary:            ImagePolygon draws broken lines when using
                     Antialiasing
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            GD related
 Operating System:   *
 PHP Version:        5.2.6
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Fixed since at least GD 2.1.0


Previous Comments:
------------------------------------------------------------------------
[2005-12-26 17:27:29] sniper@php.net

Assuming this happens also with PHP 5.

------------------------------------------------------------------------
[2005-08-06 19:36:36] pajoye@php.net

I do not need more examples, as I said, it seems to be a blending problem, pixel are blended 2 times
near the intersections.

------------------------------------------------------------------------
[2005-08-06 19:13:02] yorick at gmx dot ch

If you need more examples let me know.

It's often happening at places where the 'curve' comes 
close to 45 degrees and is ascending. I know this might 
sound weird but I've seen tons of cases where these 2 
facts seem to be present.

------------------------------------------------------------------------
[2005-08-06 19:06:26] pajoye@php.net

Blending does that. I will try to figure out how to fix that.

--Pierre

------------------------------------------------------------------------
[2005-08-06 19:02:36] yorick at gmx dot ch

Description:
------------
ImagePolygon draws broken lines when Antialiasing is 
enabled. See example at http://
glassdbase.unibas.ch/test.php

Reproduce code:
---------------
<?php
$image = imagecreatetruecolor(500, 300);
$bg = imagecolorallocate($image, 0, 0, 0);
$col_poly = imagecolorallocate($image, 255, 255, 255);
$poly = array(35, 190, 42, 191, 45, 192, 48, 186, 51, 182, 63, 180, 78, 175, 91, 177, 115, 185,
		121, 184,
		131, 177,
		174, 133,
		201, 121,
		429, 60,
		435, 82,
		435, 260,
		35, 260
);
imageantialias($image, true);
imagepolygon($image, $poly, count($poly) / 2, $col_poly);
header("Content-type: image/png");
imagepng($image);
?> 

Expected result:
----------------
An antialiased polygon (=no interruption) as described 
in documentation.

Actual result:
--------------
See output of above example at http://
glassdbase.unibas.ch/test.php


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=34020&edit=1


Thread (8 messages)

« previous php.bugs (#192097) next »