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

Issue 845556 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 634542



Sign in to add a comment

Add bit depth option to ImageBitmapOptions

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

Issue description

Add bit depth support to ImageBitmapOptions:

enum ImagePixelFormat { "8-8-8-8", "float16" };

partial dictionary ImageBitmapOptions {
    [RuntimeEnabled=CanvasColorManagement] ImagePixelFormat ImagePixelFormat = "8-8-8-8";
};

This bug includes three tasks:
- Implement the new option
- Provide test coverage
- Add to the proposal
 
After discussing this with junov@ and fserb@, ImagePixelFormat default value will be the minimum bit depth that presents the image pixels without any precision loss.
Cc: -junov@chromium.org
Looking again at this bug, it is not very clear why we should allow user to ask for a half float backed image bitmap from an 8888 image source even if source is wide gamut (since image bitmap is only provided for drawing on canvas without undue latency, and the bit depth does not affect the blending beyond precision).

The other way can make sense though, allowing users to create 8888 backed image bitmap from wide gamut sources with more than 8 bit per channel (like a 10 bit video or a 16 bit PNG).

May be:

enum ImagePixelFormat { "default", "8-8-8-8"};

partial dictionary ImageBitmapOptions {
    [RuntimeEnabled=CanvasColorManagement] ImagePixelFormat imagePixelFormat = "default";
};

where default value will be the minimum bit depth that presents the image pixels without any precision loss and "8-8-8-8" enforces 8888 pixel format.
kbr@ also agrees that users don't need to be able to "over-allocate the backing store for things like images". Therefore, "8-8-8-8" option falls back to "default" if the image has less than 8 bit per channel.
Status: Fixed (was: Assigned)

Sign in to add a comment