[Mono-bugs] [Bug 457138] New: libgdiplus PNG decoder darkens partially transparent pixels

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Dec 7 23:50:36 EST 2008


https://bugzilla.novell.com/show_bug.cgi?id=457138


           Summary: libgdiplus PNG decoder darkens partially transparent
                    pixels
           Product: Mono: Class Libraries
           Version: 2.0.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: libgdiplus
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: novell at collinjackson.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=258520)
 --> (https://bugzilla.novell.com/attachment.cgi?id=258520)
Example input file

Description of Problem:
libgdiplus PNG decoder darkens partially transparent pixels

Steps to reproduce the problem:

Run this program:
1. Make a PNG with partially transparent colored pixels
2. System.Drawing.Image.FromFile("in.png").Save("out.png"); 


Actual Results:
Input file and output file look the same

Expected Results:
Pixels in output file are darker.

How often does this happen? 
Always

Additional Information:

Appears to be caused by these lines in libgdiplus's pngcodec.c:

if (a < 0xff) {
  r = pre_multiplied_table [r][a];
  g = pre_multiplied_table [g][a];
  b = pre_multiplied_table [b][a];
}

I tried removing them and everything worked great.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list