Bug #55332 [Bgs]: imagefilledarc renders alpha transparency wrong
| From: | evi1m4chine at googlemail dot com | Date: | Mon, 01 Aug 2011 13:58:56 +0000 |
| Subject: | Bug #55332 [Bgs]: imagefilledarc renders alpha transparency wrong | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-162336@lists.php.net to get a copy of this message | ||
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:
Yeah? Which one do you mean? Since you still didnât link to any.
Because the only ones I found, were at least 4-9 years old, and only vaguely and/or badly describing
something like this.
Face it: They are abandoned. :P
Previous Comments:
------------------------------------------------------------------------
[2011-08-01 13:11:00] pajoye@php.net
it is not abandoned only not fixed.
------------------------------------------------------------------------
[2011-08-01 13:05:00] evi1m4chine at googlemail dot com
You didnât even care to mark it as duplicate of whatever you think is the already existing bug.
And I know why: Because that would show quite clearly, how that bug is abandoned and will never ever
get fixed *ever*.
Oh well. What did I expect from âthe most buggy scripting language on the planetâ(TM)?
------------------------------------------------------------------------
[2011-08-01 13:02:17] evi1m4chine at googlemail dot com
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.â
------------------------------------------------------------------------
[2011-08-01 00:07:20] pajoye@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