[Webkit-unassigned] [Bug 138477] New: Don't premultiply and then unpremultiply PNGs on iOS.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 6 15:16:10 PST 2014


            Bug ID: 138477
           Summary: Don't premultiply and then unpremultiply PNGs on iOS.
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: roger_fong at apple.com

On iOS, when we specify png as not being premultiplied, CG will still premultiply the pngs for optimization purposes.
However, this causes rounding issues because if we want the raw PNG data back later and have to unmultiply, we lose data because the premultiplication ceil's the premultiplied value. 

This is an original issue if we have an alpha value of 1/255. We will round any color channel value to somewhere between 0-1 and then round to 1. When we unmultiply we get a final pixel value of 255,255,255,1.
While visually this is not a big issue since alpha is so low, we fail a number of conformance tests including
conformance/context/premultiplyalpha-test.html which explicitly check pixel values.

Thus in these special cases we should just retrieve the non premultiplied data in the first place.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141106/510b1bf3/attachment-0002.html>

More information about the webkit-unassigned mailing list