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

Issue 671356 link

Starred by 2 users

Issue metadata

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

Blocked on:
issue skia:6022
issue 670703

Blocking:
issue 634542



Sign in to add a comment

Use the correct color space in ImageBitmap::copyBitmapData

Project Member Reported by zakerinasab@chromium.org, Dec 5 2016

Issue description

Currently in ImageBitmap::copyBitmapData we use null color space to read the pixels from image bitmap (for different purposes, including serialization). Instead, we must preserve the pixels color information by using the color space of the current ImageBitmap object (to avoid gamut clamping, etc.). 

This requires accessing m_image->imageForCurrentFrame()->colorSpace(), to be provided in  crbug.com/skia/6022 .

When this is fixed, please check the call hierarchy of ImageBitmap::copyBitmapData to make sure proper parameters are passed to this function.
 
After this fix proper unit/layout test must be provided for ImageBitmap::createImageBitmap.
As discussed with jbroman@, the current parameter set of copyBitmapData is not correct. Instead of passing the color data format to copyBitmapData, the serializer (and others) must inquiry for the correct data format if they don't want the color information to get clamped.
Blockedon: 670703
Blocking: -670703
Labels: -Type-Bug Type-Feature
Project Member

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

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

commit 2b0e6a516e0b953adea91efcbbf8399fbca7016c
Author: Reza.Zakerinasab <zakerinasab@chromium.org>
Date: Thu Jul 13 16:50:02 2017

Add color settings to ImageData and ImageBitmap serialization

This CL adds color settings to ImageData and ImageBitmap serialization code.

Bug:  670703 ,  671356 ,  735976 
Change-Id: I854723eb8fa563bdd8755a002f182092b3f903b3
Reviewed-on: https://chromium-review.googlesource.com/552822
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486412}
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/bindings/bindings.gni
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/bindings/core/v8/serialization/SerializationTag.h
[add] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedColorParams.cpp
[add] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedColorParams.h
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/bindings/core/v8/serialization/SerializedScriptValue.h
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.h
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.h
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/core/html/ImageData.cpp
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/core/html/ImageData.h
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/core/imagebitmap/ImageBitmap.cpp
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/core/imagebitmap/ImageBitmap.h
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/platform/graphics/CanvasColorParams.cpp
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/Source/platform/graphics/CanvasColorParams.h
[modify] https://crrev.com/2b0e6a516e0b953adea91efcbbf8399fbca7016c/third_party/WebKit/public/web/WebSerializedScriptValueVersion.h

Status: Fixed (was: Assigned)
Blocking: 634542

Sign in to add a comment