What
gamut-png cites the tRNS chunk as §11.3.2.1 in six files. The vendored PNG 3rd edition
(references/png/png-3.html) numbers tRNS §11.3.1.1 tRNS Transparency, and gives
§11.3.2.1 to cHRM Primary chromaticities and white point. A reader following the citation
lands on a different chunk's clause.
Sites (every one is a doc comment or a test's header; none affects behaviour):
crates/gamut-png/src/ancillary.rs — WrittenPalette::trns
crates/gamut-png/src/encoder.rs — the truecolour tRNS sample-width comment
crates/gamut-png/src/reduce.rs — three sites (Reduced doc, the colour-key conditions, the
transparent-first ordering rationale)
crates/gamut-png/tests/colour_key.rs — two sites
crates/gamut-png/tests/ancillary_colour_type.rs — the palette-alpha helper
crates/gamut-png/STATUS.md — the palette-optimization axis
The claims each citation supports are correct — §11.3.1.1 does say a truecolour tRNS is three
16-bit big-endian samples, does give a decoder exactly one transparent colour, and does make
entries past the end of a palette tRNS opaque. Only the number is wrong.
Why file it rather than fix it in passing
It touches six files across the encoder, the reducer and two test suites, none of which is on the
surface of the change that found it (#550, metadata preservation). A mechanical citation sweep is
its own review.
Suggested scope
Correct the number at every site, and consider whether the crate wants a cheap guard — the
sections it cites are stable and enumerable, so a check that every §11.3.x.y in the crate
resolves to a heading in the vendored HTML would stop the next one.
Found while auditing §11.3 citations for #550.
What
gamut-pngcites thetRNSchunk as §11.3.2.1 in six files. The vendored PNG 3rd edition(
references/png/png-3.html) numberstRNS§11.3.1.1 tRNS Transparency, and gives§11.3.2.1 to cHRM Primary chromaticities and white point. A reader following the citation
lands on a different chunk's clause.
Sites (every one is a doc comment or a test's header; none affects behaviour):
crates/gamut-png/src/ancillary.rs—WrittenPalette::trnscrates/gamut-png/src/encoder.rs— the truecolourtRNSsample-width commentcrates/gamut-png/src/reduce.rs— three sites (Reduceddoc, the colour-key conditions, thetransparent-first ordering rationale)
crates/gamut-png/tests/colour_key.rs— two sitescrates/gamut-png/tests/ancillary_colour_type.rs— the palette-alpha helpercrates/gamut-png/STATUS.md— the palette-optimization axisThe claims each citation supports are correct — §11.3.1.1 does say a truecolour
tRNSis three16-bit big-endian samples, does give a decoder exactly one transparent colour, and does make
entries past the end of a palette
tRNSopaque. Only the number is wrong.Why file it rather than fix it in passing
It touches six files across the encoder, the reducer and two test suites, none of which is on the
surface of the change that found it (#550, metadata preservation). A mechanical citation sweep is
its own review.
Suggested scope
Correct the number at every site, and consider whether the crate wants a cheap guard — the
sections it cites are stable and enumerable, so a check that every
§11.3.x.yin the crateresolves to a heading in the vendored HTML would stop the next one.
Found while auditing §11.3 citations for #550.