PNG transparency not 100% transparent

CLOSED INVALID

Status

()

Core
ImageLib
CLOSED INVALID
16 years ago
16 years ago

People

(Reporter: andrew hull, Assigned: Stuart Parmenter)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

260 bytes, image/png
Details
1.98 KB, text/html
Details
(Reporter)

Description

16 years ago
simple PNGs with one transparent color are just slightly off from perfectly
transparent. i only noticed it when layering several PNGs so that the effect was
cumulative, but later testing showed a single PNG was causing a slight alpha
even with its full transparent pixels

in the test case, the background color of #888888 is being alpha'd to #878787 by
a single PNG on the left and 12 of the same PNGs push it #7c8787 on the right.

the PNG was created by GD (PHP bindings) like so:

  $im=imageCreate(255,227);
  $trcolor=imageColorAllocate($im,0,0,0);
  imageColorTransparent($im,$trcolor);
  $color=imageColorAllocate($im,0xcc,0,0);
  imageFilledRectangle($im,0,0,255,227,$trcolor);
  imageFilledPolygon($im,$coords,count($coords)/2,$color);
  imagePNG($im,"a_1.png");

i dont know enough to determine if GD's PNG encoding is at fault but it seems
unlikely for something so simple. even IE's **** PNG renderer does this correctly.
(Reporter)

Comment 1

16 years ago
Created attachment 104267 [details]
test page
(Reporter)

Comment 2

16 years ago
Created attachment 104268 [details]
test PNG
(Reporter)

Comment 3

16 years ago
Created attachment 104269 [details]
test page
Attachment #104267 - Attachment is obsolete: true

Comment 4

16 years ago
Confirming 10/25 cvs on Win2k.  I can't find a dupe for this and the testcase 
is noticeably different on IE6.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This happens on Linux as well (2002-10-25-08 trunk build).
Severity: minor → normal
OS: Windows XP → All
Hardware: PC → All

Comment 6

16 years ago
The background of that PNG is (0,135,135) with an alpha value of 1.

Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → INVALID
(Reporter)

Comment 7

16 years ago
error *was* in GD
Status: RESOLVED → CLOSED
You need to log in before you can comment on or make changes to this bug.