Re: 1 byte hex values

I believe Chris Seeger and Jerome are talking about the values used in our
cICP examples.
(In the images I sent yesterday, I typed decimal values like '16' into the
hex editor, resulting in the stored number of '22'. Whoops.)

Elsewhere in the spec, we list hexadecimal values. For example,

The four-byte chunk type field contains the hexadecimal values

69 43 43 50


But in section 11.3.2.6 of the spec
<https://w3c.github.io/PNG-spec/#cICP-chunk> (where we define the cICP
chunk) we give examples with decimal values.



That said, Chris Lilley is right that we probably need to also be explicit
that these 1-byte values in the cICP chunk are unsigned.


On Thu, Dec 7, 2023 at 10:37 AM Chris Lilley <chris@w3.org> wrote:

> The rest of the PNG spec is explicit about 4-byte and 2-byte values being
> unsigned integer; for 1-byte values it does not say they are unsigned (and
> probably should).
>
> But given that values are stored in one byte, how else would a value like
> 13 be stored? However we should say whether a given value in an example is
> in hex or in decimal, in case someone reads 13 and assumes that is 0x13 ie
> 19.
> On 2023-12-07 07:55, Seeger, Chris (NBCUniversal) wrote:
>
> Jerome at MediaArea pointed out a mistake in our values for the chunk.
>
>
>
> We have to translate the decimal CICP values to 1-byte Hex I think?
>
>
>
> If this is right, we should point this out in our examples for the spec
> (which I can do).
>
>
>
> This only affects the examples for PQ and HLG as SDR is a value of “1” and
> remains unchanged.
>
>
>
> Can someone confirm I am correct about this?
>
>
>
> Best,
>
> Chris
>
> --
> Chris Lilley
> @svgeesus
> Technical Director @ W3C
> W3C Strategy Team, Core Web Design
> W3C Architecture & Technology Team, Core Web & Media
>
>

Received on Thursday, 7 December 2023 16:50:06 UTC