Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to HDR/High bit depth/additional channels in images and video - PNG and JPEG-XL and H264 #427

Closed
wayfarer3130 opened this issue Dec 20, 2021 · 5 comments

Comments

@wayfarer3130
Copy link

Several of the image formats and video formats now defined allow defining both additional channels and higher bit depths (9+). Access to this data as raw data is critical for some types of applications such as:

  1. Video editing - so that the original data can be set or modified
  2. Medical images - so that the native image decoder can be used instead of re-implementing one in WASM
  3. Overlay display - to control additional overlays such as identification of a given area
  4. Custom rendering such as rendering an object with reflectivity values encoded in the raw image
  5. Creation/publication of HDR data
  6. Viewing of scenes at specified lighting levels - the transform would have to be on the raw data, so that at high brightness levels, none of the dark data is visible, while at low lightness levels, only the dark data is visible (eg games showing a door opening)

It would be extremely helpful to have the webcodecs API include access to the raw image data, any number of channels as not just byte data but also 16 or 32 bit data, as well as 1 bit data (because accessing the data as individual 1 bit in 8 bit objects is very inefficient).

@chcunningham
Copy link
Collaborator

Support for higher bit depths is definitely on the road map. Supporting 1 bpp formats should also be doable. Which 1 bpp format(s) are most common?

I'm a little confused about "additional channels"... do mean something more than an alpha channel? Can you point to an example of a codec API that does what you want?

Rendering HDR VideoFrames/Images is somewhat blocked on Canvas support (context here and here).

@wayfarer3130
Copy link
Author

wayfarer3130 commented Jan 18, 2022 via email

@sandersdan
Copy link
Contributor

I'm familiar with this sort of use in the FITS image format for astronomy, but I'm not aware of any image format supported by browsers with these sorts of features. Are you asking for just the API portion so that a polyfill could implement this, for browsers to support a new format, or is there an existing, supported format that we simply need to expose more features from?

@wayfarer3130
Copy link
Author

wayfarer3130 commented Jan 18, 2022 via email

@dalecurtis
Copy link
Contributor

Duplicate of #384

@dalecurtis dalecurtis marked this as a duplicate of #384 Mar 16, 2023
@dalecurtis dalecurtis closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants