mozilla / standards-positions

https://mozilla.github.io/standards-positions/
Mozilla Public License 2.0
636 stars 69 forks source link

Coding Independent Code Points (CICP) and PNG `cICP` #922

Open svgeesus opened 10 months ago

svgeesus commented 10 months ago

Request for Mozilla Position on an Emerging Web Specification

Other information

CICP is a way to identify the color space and transfer function; specified in ITU-T-H.273 originally for video formats, it is now widely deployed and starting to be used in image formats such as AVIF and JPEG-XL. It is particularly used for HDR content, but can also be used for SDR content. Compared to an embedded ICC profile, which can be 10-20k for an RGB colorspace, it only adds 4 bytes of data because it is an enumeration.

For example, an image in BT.2100 color space with the PQ transfer function would signal this with the following four bytes:

9 16 0 1

while an image in Display P3 would use

12 13 0 1

Gecko already supports CICP in AVIF, see https://bugzilla.mozilla.org/show_bug.cgi?id=1634741

The need for PNG to support HDR images was identified at the W3C Color Workshop and incubated in the Color on the Web CG

PNG Third Edition adds the cICP chunk for CICP, and this is already supported in Chrome. It is produced by image editing applications including darktable and Adobe Photoshop.

svgeesus commented 8 months ago

WPT test results for cICP in PNG shows passes in Chrome and in Edge. Safari is shown as failing, because it relies on macOS support and the version of macOS used on WPT is too old. It passes in local testing on macOS Sonoma.

Thus, the only browser now failing is Firefox.

svgeesus commented 7 months ago

@tnikkel @emilio who in Mozilla should we be talking to about this?

emilio commented 7 months ago

@tnikkel is a good guess. @jrmuizel and @kdashg might have opinions too?

jrmuizel commented 7 months ago

I don't see any reason not to support this.