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

Issue 714649 link

Starred by 1 user

Issue metadata

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

Blocked on:
issue 714266
issue 716136

Blocking:
issue 634542
issue 665919



Sign in to add a comment

Fix ImageBitmap constructor from ImageData to be color managed

Project Member Reported by zakerinasab@chromium.org, Apr 24 2017

Issue description

ImageBitmap constructor from ImageData does not handle the needed color space conversions correctly. This was noted again when trying to add P3 and Rec2020 support to ImageBitmap ( crbug.com/714266 ).

I assume the expected behavior is to not lose color information. Hence, the color space of the ImageBitmap will be that of source ImageData. the default color type is kN32_SkColorType. If the storage format of the ImageData is anything but Uint8ClampedArray, the color type of the SkImage backing ImageBitmap will be kRGBA_F16SkColorType.

This will be addressed on top of  crbug.com/714266 .
 
After fixing this, add p3 and rec2020 to the following unit tests:

ImageBitmapTest.ImageBitmapColorSpaceConversionImageData()
CanvasRenderingContext2DTest.ImageBitmapColorSpaceConversion()
Blocking: 665919
Cc: zakerinasab@chromium.org
 Issue 714349  has been merged into this issue.
Blockedon: 716136
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 13 2017

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

commit 70d96a8266f71bb56e1cbbc54689b59d8eab5d40
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Tue Jun 13 19:14:11 2017

Refactor ImageBitmap

This CL refactors ImageBitmap. It was essentially started to fix
ImageBitmap constructor from ImageData which was not correctly handling
ColorSpaceConversion attribute passed in ImageBitmapOptions. During the
developement it gradually extended to improving other constructors too.
(This CL is moved from Rietveld codereview.chromium.org/2845193002.)

BUG= 714649 , 683307 ,627855, 715264 , 715239 , 714364 , 686862 , 665919 

Change-Id: Iecba66e8764b189a4f5130096b4b5a19a9a32cae
Reviewed-on: https://chromium-review.googlesource.com/527690
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479093}
[modify] https://crrev.com/70d96a8266f71bb56e1cbbc54689b59d8eab5d40/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage-expected.txt
[modify] https://crrev.com/70d96a8266f71bb56e1cbbc54689b59d8eab5d40/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-drawImage.html
[modify] https://crrev.com/70d96a8266f71bb56e1cbbc54689b59d8eab5d40/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-out-of-bounds-src-expected.html
[modify] https://crrev.com/70d96a8266f71bb56e1cbbc54689b59d8eab5d40/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-recursive.html
[modify] https://crrev.com/70d96a8266f71bb56e1cbbc54689b59d8eab5d40/third_party/WebKit/LayoutTests/fast/canvas/webgl/resources/tex-image-and-sub-image-image-bitmap-utils.js
[modify] https://crrev.com/70d96a8266f71bb56e1cbbc54689b59d8eab5d40/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
[modify] https://crrev.com/70d96a8266f71bb56e1cbbc54689b59d8eab5d40/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp
[modify] https://crrev.com/70d96a8266f71bb56e1cbbc54689b59d8eab5d40/third_party/WebKit/Source/core/html/ImageData.cpp
[modify] https://crrev.com/70d96a8266f71bb56e1cbbc54689b59d8eab5d40/third_party/WebKit/Source/core/html/ImageData.h

Status: Fixed (was: Assigned)
Blocking: 634542

Sign in to add a comment