<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 2:59 PM, Dean Jackson <span dir="ltr"><<a href="mailto:dino@apple.com" target="_blank">dino@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On 3 May 2016, at 7:04 AM, Rik Cabanier <<a href="mailto:cabanier@gmail.com" target="_blank">cabanier@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 1:58 PM, Simon Fraser <span dir="ltr"><<a href="mailto:simon.fraser@apple.com" target="_blank">simon.fraser@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span><blockquote type="cite"><div>On May 2, 2016, at 1:45 PM, Rik Cabanier <<a href="mailto:cabanier@gmail.com" target="_blank">cabanier@gmail.com</a>> wrote:</div><br><div><div dir="ltr">All,<div><br></div><div>with the release of DCI-P3 screen, WebKit began supporting the display of high gamut images.</div><div>Specifically, if you have an image with a DCI-P3 profile, its pixels render untouched on the new displays.</div><div><br></div><div>However, if you try do do any sort of canvas manipulation, you will see that the colors are being compressed to sRGB and you will lose the depth of the color.</div><div><br></div><div>Was it an oversight to always create the canvas imagebuffer in sRGB? [1]<br></div></div></div></blockquote><div><br></div></span>No, this was a deliberate choice. We can't change author expectations for what getImageData() return.</div></div></blockquote><div><br></div><div>Now we see different visual output which is also not what an author expects :-(<br></div></div></div></div></div></blockquote><div><br></div></span><div>Since there is no way to create a canvas element with pixel data that is interpreted to be in anything other than sRGB, this behaviour seems expected to me. I'm not sure what else could happen? We couldn't magically make all the canvas elements in the page use P3. If we did that, they wouldn't match the CSS content.</div></div></div></blockquote><div><br></div><div>I don't see why that would be. CSS colors and tagged/untagged images would be color corrected while being drawn just like it happens in HTML.</div><div>get/putImageData would of course be uncorrected as it works on raw pixels.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>The fix is coming: a way to tag the colorspace of the canvas element.</div></div></div></blockquote><div><br></div><div>That's great! Do you have an idea how far off that proposal is?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div><span class=""><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Can you elaborate what is unexpected with getImageData? Is it that css "red" no longer returns 100% red pixels?</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span><blockquote type="cite"><div><div dir="ltr"><div>If this is as-designed, how can we work around this limitation?</div></div></div></blockquote><div><br></div></span>With possible future enhancements to the canvas spec that allow authors to request backing store with a different format and/or color profile.<span><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>PS</div><div>I asked the same question on WhatWG. [2]</div><div><br></div><div><br></div><div>1: <a href="https://github.com/WebKit/webkit/blob/112c663463807e8676765cb7a006d415c372f447/Source/WebCore/platform/graphics/ImageBuffer.h#L73" style="font-size:12.8px" target="_blank">https://github.com/WebKit/webkit/blob/112c663463807e8676765cb7a006d415c372f447/Source/WebCore/platform/graphics/ImageBuffer.h#L73</a></div><div>2: <a href="https://lists.w3.org/Archives/Public/public-whatwg-archive/2016Apr/0036.html" target="_blank">https://lists.w3.org/Archives/Public/public-whatwg-archive/2016Apr/0036.html</a></div></div></div></blockquote><br></span></div><span><font color="#888888"><div>Simon</div><div><br></div><br></font></span></div></blockquote></div><br></div></div></span>
_______________________________________________<br>webkit-dev mailing list<br><a href="mailto:webkit-dev@lists.webkit.org" target="_blank">webkit-dev@lists.webkit.org</a><br><a href="https://lists.webkit.org/mailman/listinfo/webkit-dev" target="_blank">https://lists.webkit.org/mailman/listinfo/webkit-dev</a><br></div></blockquote></div><br></div></blockquote></div><br></div></div>