Re: Unofficial pngcheck with cICP support

On 2025-01-08 15:17, Chris Lilley wrote:
>
> I forked a copy of the latest (3.0.3) pngcheck onto GitHub [1]. I then 
> hacked in some cICP support [2].
>
I have now added mDCV [3] and cLLI [4] support. There are some checks 
for invalid values, and also an error if the old mDCv or cLLi are found.

Sample output:

chris@SuperNomad:/mnt/c/Users/chris/Documents/PNG/cICP_mDCV_cLLI update$ pngcheck -c -v PNG-PQ-BT.2111-ColorBars-16bit-C
ICP-mDCV-max4Knit-min.0005nit-cLLI-FR.png
File: PNG-PQ-BT.2111-ColorBars-16bit-CICP-mDCv-max4Knit-min.0005nit-cLLi-FR.png (92279 bytes)
   chunk IHDR at offset 0x0000c, length 13
     1920 x 1080 image, 48-bit RGB, non-interlaced
   chunk pHYs at offset 0x00025, length 9: 0x1 pixels/unit (0:1)
   chunk cICP at offset 0x0003a, length 4
:   Rec. ITU-R BT.2100-2 perceptual quantization (PQ) system
     White x = 0.3127 y = 0.329,  Red x = 0.708 y = 0.292
     Green x = 0.17 y = 0.797,  Blue x = 0.131 y = 0.046
     Full range
   chunk mDCV at offset 0x0004a, length 24
     Mastering Display
     White x = 0.3127 y = 0.329,  Red x = 0.708 y = 0.292
     Green x = 0.17 y = 0.797,  Blue x = 0.131 y = 0.046
     Maximum luminance = 4000 cd/m^2
     Minimum luminance = 0.0005 cd/m^2
   chunk cLLI at offset 0x0006e, length 8
     Maximum content light level = 4000 cd/m^2
     Maximum frame average light level = 250 cd/m^2
   chunk IDAT at offset 0x00082, length 4096
     zlib: deflated, 32K window, fast compression
   chunk IDAT at offset 0x0108e, length 4096
   chunk IDAT at offset 0x0209a, length 4096
   chunk IDAT at offset 0x030a6, length 4096
   chunk IDAT at offset 0x040b2, length 4096
   chunk IDAT at offset 0x050be, length 4096
   chunk IDAT at offset 0x060ca, length 4096
   chunk IDAT at offset 0x070d6, length 4096
   chunk IDAT at offset 0x080e2, length 4096
   chunk IDAT at offset 0x090ee, length 4096
   chunk IDAT at offset 0x0a0fa, length 4096
   chunk IDAT at offset 0x0b106, length 4096
   chunk IDAT at offset 0x0c112, length 4096
   chunk IDAT at offset 0x0d11e, length 4096
   chunk IDAT at offset 0x0e12a, length 4096
   chunk IDAT at offset 0x0f136, length 4096
   chunk IDAT at offset 0x10142, length 4096
   chunk IDAT at offset 0x1114e, length 4096
   chunk IDAT at offset 0x1215a, length 4096
   chunk IDAT at offset 0x13166, length 4096
   chunk IDAT at offset 0x14172, length 4096
   chunk IDAT at offset 0x1517e, length 4096
   chunk IDAT at offset 0x1618a, length 1753
   chunk IEND at offset 0x1686f, length 0
No errors detected in PNG-PQ-BT.2111-ColorBars-16bit-CICP-mDCV-max4Knit-min.0005nit-cLLI-FR.png (29 chunks, 99.3% compression).


[1] https://github.com/svgeesus/pngcheck
[2] https://github.com/svgeesus/pngcheck/pull/1
[3] https://github.com/svgeesus/pngcheck/pull/2
[4] https://github.com/svgeesus/pngcheck/pull/3

-- 
Chris Lilley
@svgeesus
Technical Director @ W3C
W3C Strategy Team, Core Web Design
W3C Architecture & Technology Team, Core Web & Media

Received on Wednesday, 15 January 2025 23:16:04 UTC