w3c / w3c/webcodecs

Metadata access when decoding images

Open
#201 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

extension image
Dominant language
HTML
Stars
1.3k
Forks
194
Avg merge
1d 13h
Merged PRs (30d)
3

Description

This specification proposes to demux and decode image files. In addition to be able to display the file, it needs to be able to surface frequently used information about those images. A few query in a search engine shows that this is something overwhelmingly popular (for example on stack overflow, but also searching github for wasm/js based decoders).

What immediately comes to mind is to know the dimension of an image before having decoded it (to prepare layout). But generally lots of info are parsed by the implementation, and then not surfaced to script, which is unfortunate, because it means that developers need to ship a bunch of code (probably compiled to WASM or something like that), to do something that the browser already does (and probably better/faster).

Other things I'm thinking of (not exhaustive):

  • pixel bit depth / decoded image format (to prepare textures/canvas while/before the image is decoded)
  • orientation / more EXIF metadata or other metadata (depending on the format), this is simply necessary to allow layering
  • color space (≠ color space conversion)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by reviewing the WebCodecs image-decoding specification and define the metadata scope, including dimensions, bit depth, orientation, and color space, before implementation; done means the selected information is surfaced to script.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
22/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.