w3c / media-capabilities

Media Capabilities API
https://w3c.github.io/media-capabilities/
Other
78 stars 32 forks source link

What about still images? #194

Open jonsneyers opened 2 years ago

jonsneyers commented 2 years ago

This seems rather focused on video capabilities, but the key capability that matters is the display itself, which influences both video and still images. Color gamut, dynamic range, transfer curve, bit depth, peak nits, etc are as relevant for still images as for video.

Perhaps some of these concepts could be formulated in a somewhat more generic way, e.g. not using names like VideoConfiguration but rather DisplayCapabilities?

Also, I think this should be implemented in such a way that it can be made to work for images in an img tag without harming prefetch and without causing a combinatorial explosion of variants in the markup: X formats times Y dimensions times Z display capabilities is too much for a picture tag, a single img tag with the server figuring out which image to send based on request headers is the way to go imo.

chrisn commented 11 months ago

This API is intended to focus on decoding capabilities and leave display/rendering capabilities to other specs, e.g., there are media queries in https://drafts.csswg.org/mediaqueries-5/.

chrisn commented 4 months ago

For images, see ImageDecoder.isTypeSupported(), and https://github.com/whatwg/html/pull/10055 which proposes adding isTypeSupported() to img tags (HTMLImageElement).