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

 ID:                 55332
 User updated by:    evi1m4chine at googlemail dot com
 Reported by:        evi1m4chine at googlemail dot com
 Summary:            imagefilledarc renders alpha transparency wrong
 Status:             Bogus
 Type:               Bug
 Package:            GD related
 Operating System:   Linux(x86)/GNU/Gentoo(Hardened)
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 New Comment:

Have you even read my comment??
I repeat: “The reason I made a new bug for this, is that the old ones are 
years old, abandonded, lackinng reproducability and are vague in their 
description. This one is easy to reproduce with the script, very specific and 
clearly described. The only bugs can be marked as duplicates of this one.”


Previous Comments:
------------------------------------------------------------------------
[2011-08-01 00:07:20] paj...@php.net

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

We already have a report about this issue.

------------------------------------------------------------------------
[2011-07-31 23:52:11] evi1m4chine at googlemail dot com

Description:
------------
When drawing filled arcs with a alpha-transparent color, imagefilledarc creates 
a transparency gradient that looks like it drew a number of lines on top of 
each other.

The supplied test script and info below is easier to understand, than a textual 
description can be,

GDlib version: 2.0.35

P.S.: The reason I made a new bug for this, is that the old ones are years old, 
abandonded, lackinng reproducability and are vague in their description. This 
one is easy to reproduce with the script, very specific and clearly described. 
The only bugs can be marked as duplicates of this one.

Test script:
---------------
<?php // Outputs a PNG image with alpha transparency.
function imagefilledroundedrectangle(&$im, $x1, $y1, $x2, $y2, $radius, $color) 
{
    imagefilledrectangle($im, $x1+$radius, $y1, $x2-$radius, $y1+$radius, 
$color);
    imagefilledrectangle($im, $x1, $y1+$radius, $x2, $y2-$radius, $color);
    imagefilledrectangle($im, $x1+$radius, $y2-$radius, $x2-$radius, $y2, 
$color);
    imagefilledarc($im, $x2-$radius, $y2-$radius, $radius*2, $radius*2,   0,  
90, $color, IMG_ARC_PIE);
    imagefilledarc($im, $x1+$radius, $y2-$radius, $radius*2, $radius*2,  90, 
180, $color, IMG_ARC_PIE);
    imagefilledarc($im, $x1+$radius, $y1+$radius, $radius*2, $radius*2, 180, 
270, $color, IMG_ARC_PIE);
    imagefilledarc($im, $x2-$radius, $y1+$radius, $radius*2, $radius*2, 270, 
360, $color, IMG_ARC_PIE);
}
$img = imagecreatetruecolor(200,200);
imagefilledroundedrectangle($img, 50, 50, 150, 150, 25, 0x1F7F7F7F);
imagepng($img);
imagedestroy($img);
?>

Expected result:
----------------
A transparent PNG image of 200×200px,
containing a rectangle of 100×100px at the center,
which has corners rounded to a radius of 25px,
a 50% gray color
and *uniform* transparency of 25%.

Actual result:
--------------
A transparent PNG image of 200×200px,
containing a rectangle of 100×100px at the center,
which has corners rounded to a radius of 25px,
a 50% gray color
and a transparency *angle gradient* of 0-100%.


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



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

Reply via email to