- From: Chris Lilley <chris@w3.org>
- Date: Fri, 8 Dec 2023 15:53:36 -0500
- To: "Seeger, Chris (NBCUniversal)" <Chris.Seeger@nbcuni.com>, "public-png@w3.org" <public-png@w3.org>
- Message-ID: <e3cea813-691b-4107-8c42-4f853ded2f1a@w3.org>
Sorry I was in a rush to get to another meeting, meant to add the link, forgot The page is here: https://www.nayuki.io/page/png-file-chunk-inspector source is here: https://github.com/nayuki/Nayuki-web-published-code/tree/master/png-file-chunk-inspector my unofficial extension to that code to add cICP support is very simple ["cICP", "Coding-independent code points ", false, (chunk, earlier) =>{ addErrorIfHasType(earlier, "PLTE", chunk, "Chunk must be before PLTE chunk"); addErrorIfHasType(earlier, "IDAT", chunk, "Chunk must be before IDAT chunk"); if(chunk.data.length !=4) { chunk.errorNotes.push("Invalid data length"); return; } constchromaticities=chunk.data[0]; consttransfer=chunk.data[1]; constmatrix=chunk.data[2]; constvideowidth=chunk.data[3]; if(matrix!==0) { chunk.errorNotes.push("PNG only supports RGB data"); } if(videowidth>1) { chunk.errorNotes.push("Undefined video width value, must be narrow or full"); } // look for specific, common combination values first if(chromaticities===1) { // HDTV or sRGB if(transfer===1) { chunk.innerNotes.push(`Rec BT.709 HDTV`); } elseif(transfer===8) { chunk.innerNotes.push(`Linear-light sRGB`); } elseif(transfer===13) { chunk.innerNotes.push(`IEC 61966-2-1 sRGB`); } } elseif(chromaticities===9) { // BT.2020 or BT.2100 if(transfer===14) { chunk.innerNotes.push(`Rec. ITU-R BT.2020-2 (10-bit system)`); } elseif(transfer===15) { chunk.innerNotes.push(`Rec. ITU-R BT.2020-2 (12-bit system)`); } elseif(transfer===16) { chunk.innerNotes.push(`Rec. ITU-R BT.2100-2 (PQ system)`); } elseif(transfer===18) { chunk.innerNotes.push(`Rec. ITU-R BT.2100-2 (HLG system)`); }; // Only mention narrow or full range if both are actually options if(videowidth===0) { chunk.innerNotes.push(`Narrow Range`); } else{ chunk.innerNotes.push(`Full Range`); }; } elseif(chromaticities===12) { // SMPTE EG 432-1 (2010) - DCI D65 if(transfer===13) { // Display-P3 uses sRGB transfer function chunk.innerNotes.push(`Display-P3`); } } else{ // Not common combination letc, t, m, p; c=chromaticities.toString(); chunk.innerNotes.push(`Chromaticity: ${c}`); t=transfer.toString(); chunk.innerNotes.push(`Transfer: ${t}`); m=(matrix===0) ?"RGB":"YCC"; chunk.innerNotes.push(`Matrix: ${m}`); p=(videowidth===0) ?"Narrow":"Wide"; chunk.innerNotes.push(`videowidth: ${p}`); } }], On 2023-12-08 14:08, Seeger, Chris (NBCUniversal) wrote: > > Do you have a link to it 😊 > > Also, did I mention that MediaInfo now has support in their nightly > build (I’ve been sending out too many emails this morning). > > https://mediaarea.net/download/snapshots/binary/mediainfo-gui/ > > -Chris > > *From: *Chris Lilley <chris@w3.org> > *Date: *Friday, December 8, 2023 at 1:53 PM > *To: *public-png@w3.org <public-png@w3.org> > *Subject: *Re: [EXTERNAL] Re: Conformance files in PQ, HLG, SDR-BT.709? > > There is a nice PNG file chunk inspector, all written in JavaScript > > I took a copy and extended it to support cICP. Here is a screenshot of > the output. I recognize the most common color spaces and output their > names, otherwise I output the actual data. > > -- > Chris Lilley > @svgeesus > Technical Director @ W3C > W3C Strategy Team, Core Web Design > W3C Architecture & Technology Team, Core Web & Media -- Chris Lilley @svgeesus Technical Director @ W3C W3C Strategy Team, Core Web Design W3C Architecture & Technology Team, Core Web & Media
Received on Friday, 8 December 2023 20:53:40 UTC