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

Issue 841318 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocking:
issue 634542



Sign in to add a comment

toBlob/toDataURL should always generate the image in sRGB

Project Member Reported by zakerinasab@chromium.org, May 9 2018

Issue description

Based on the latest modifications in the canvas color management proposal, the behavior of toBlob/toDataURL is changed for wide gamut canvases:

Previous behavior: generate the image in the same wide gamut color space of the canvas
New behavior: always generate the image in sRGB

The color managed toBlob() now is supported by convertToBlob():  crbug.com/840372 .
 
Furthermore, the color profile will not be embedded in the blob / data url.
Project Member

Comment 2 by bugdroid1@chromium.org, May 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ad9b08143e91820147463077aae389a5306b1378

commit ad9b08143e91820147463077aae389a5306b1378
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Tue May 22 15:18:22 2018

toBlob/toDataURL always encode to sRGB

When the canvas is color managed and has a color space tag,
toBlob and toDataURL should respect the legacy behavior.
They should encode to sRGB color space and do not embed the
color space information in the image data.

Bug:  841318 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I075ea703df17af21330f8d1a2caa040517a0628c
Reviewed-on: https://chromium-review.googlesource.com/1057955
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560594}
[modify] https://crrev.com/ad9b08143e91820147463077aae389a5306b1378/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/623486fc93255e0033e20cb30d6a9857df48503b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/color_space/fast/canvas/color-space/toDataURL-color-managed-round-trip-expected.png
[delete] https://crrev.com/623486fc93255e0033e20cb30d6a9857df48503b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/color_space/fast/canvas/color-space/toDataURL-color-managed-round-trip-expected.png
[delete] https://crrev.com/623486fc93255e0033e20cb30d6a9857df48503b/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/color_space/fast/canvas/color-space/toDataURL-color-managed-round-trip-expected.png
[delete] https://crrev.com/623486fc93255e0033e20cb30d6a9857df48503b/third_party/WebKit/LayoutTests/platform/mac/virtual/color_space/fast/canvas/color-space/toDataURL-color-managed-round-trip-expected.png
[modify] https://crrev.com/ad9b08143e91820147463077aae389a5306b1378/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/canvas-colorManaged-toBlob-toDataURL.html
[delete] https://crrev.com/623486fc93255e0033e20cb30d6a9857df48503b/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/toDataURL-color-managed-round-trip-expected.txt
[delete] https://crrev.com/623486fc93255e0033e20cb30d6a9857df48503b/third_party/WebKit/LayoutTests/virtual/color_space/fast/canvas/color-space/toDataURL-color-managed-round-trip.html
[modify] https://crrev.com/ad9b08143e91820147463077aae389a5306b1378/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
[modify] https://crrev.com/ad9b08143e91820147463077aae389a5306b1378/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.h
[modify] https://crrev.com/ad9b08143e91820147463077aae389a5306b1378/third_party/blink/renderer/platform/graphics/image_data_buffer.cc
[modify] https://crrev.com/ad9b08143e91820147463077aae389a5306b1378/third_party/blink/renderer/platform/graphics/image_data_buffer.h

Status: Fixed (was: Assigned)

Sign in to add a comment