[Webkit-unassigned] [Bug 233370] New: WebKit is generally missing color management support

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 19 08:53:31 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=233370

            Bug ID: 233370
           Summary: WebKit is generally missing color management support
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcatanzaro at gnome.org
                CC: bugs-noreply at webkitgtk.org
        Depends on: 233364

I'm going to dump a bunch of related problems into this one single bug report, because I don't feel like reporting 20 different bugs today. We'll probably need to solve each problems in separate bugs, though. Probably not many WebKit developers are interested in color management except for Apple developers, but everything here is platform-specific, so that doesn't get us very far. Accordingly, I don't expect much progress unless an interested volunteer emerges.


Image decoders:

Currently most WebKit image decoders are missing color management support. References:

 * https://bugs.webkit.org/show_bug.cgi?id=208235#c9
 * https://bugs.webkit.org/show_bug.cgi?id=233364#c1

Decoders that already have color management: JPEG, PNG

Decoders that probably need color management: AVIF, BMP, Cairo, GIF, ICO (?), JPEG 2000, WebP


Platform support:

I assume Apple has good support for color management, but I don't know for sure and don't know how it works.

On other platforms (WPE, GTK, and WinCairo), color management support is handled inside USE(LCMS) guards. This depends on PlatformDisplay::sharedDisplay().colorProfile() to get the color profile. This is implemented exclusively for X11: all other platforms, including Wayland and Windows, just fall back to an sRGB profile.

Even the X11 implementation looks pretty suspect, because it uses the color profile for the default screen of the display, but the current screen might not be the default screen, or the application could be split across two screens at the same time, so it seems unlikely that is the correct thing to do. (I wonder if PlatformDisplay is the right place for this.)

WinCairo uses LCMS but not X11, so it sure seems like the dependency on LCMS is useless and not doing anything there. PlayStation, Apple Windows, and Windows FTW do not use LCMS, and so presumably have no color management.


Video: if images require color management, I would expect video would too, but WebKit has no code to get the color profile from LCMS to the video pipeline on any platform.


HTML/CSS: ????? not sure how this works, because I don't understand color management. I see CSS supports color space declarations, but again there is no code anywhere to get color profile to WebCore except for the JPEG and PNG image decoders, so I'm not sure this can actually be very useful.


Ideally somebody who understands color management would look over this situation and provide us some pointers. Fortunately, I think I know who to ask....


Referenced Bugs:

https://bugs.webkit.org/show_bug.cgi?id=233364
[Bug 233364] JPEG XL decoder should support understand color profiles
-- 
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/20211119/1fe764e9/attachment-0001.htm>


More information about the webkit-unassigned mailing list