New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 792797 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 792798

Blocking:
issue 634542



Sign in to add a comment

Color management for HTMLCanvasElement toBlob/toDataURL

Project Member Reported by zakerinasab@chromium.org, Dec 7 2017

Issue description

HTMLCanvasElement toBlob/toDataURL are not color managed. Now that half float storage is supported in WebGLRenderingContextBase, we can add color management to these API.
 
Blockedon: 792798
Cc: brianosman@chromium.org
Update: Trying to add color management for to toBlob/toDataURL, I encountered some difficulties with how Skia encoders encode the wide color gamut images. Apparently, this is what happening (@brianosman, please correct me if I'm wrong):

The image is encoded in wide color gamut, 8-8-8-8 pixel format, sRGB transfer curve.

This behavior makes the color conversion go in flux somewhere in the code path, causing double premul when the image is drawn onto the canvas in RecordPaintCanvas (which is part of the test scenario designed to check the code correctness).

@brianosman believes that we still can get the encoders to do the right thing, if we do it carefully. I tend to agree with him, even though I still don't know what I'm doing wrong.
Labels: -Pri-3 Pri-2
Status: Fixed (was: Assigned)
https://chromium-review.googlesource.com/c/chromium/src/+/824462 fixes this issue.

Sign in to add a comment