Repository navigation
Description
Why
Jpeg2000Rule (VellumPdf.Conformance) checks ISO 19005-2 6.2.8.3 as veraPDF's PDF/A-2 profile does, not as the clause
reads (#418 is the general case). Two of its five checks count the wrong channels:
- Test 1 reports a codestream whose component count (
Csiz, or the JP2ihdrNC) is not 1, 3 or 4. The clause limits
the number of colour channels. A JP2 file whose channel definition box (cdef) declares one grey channel and one
opacity channel has one colour channel and meets the clause, but the rule reports it. - Test 5 compares the bit depth of every channel. The clause asks for the same bit depth over the colour channels; an
opacity channel of another depth is not covered. (The rule already compares depth without the sign bit, which matches
ISO/IEC 15444-1 Table A.11, where the sign is separate from the depth.)
Which channels are colour channels is set by ISO/IEC 15444-1 I.5.3.6: without a cdef box the codestream holds colour
channels only; any auxiliary channel requires the box, whose type-0 entries are the colour channels. Both texts were
read on NEN Connect (neither is held in the repository).
Proposal
Count colour channels from cdef (type 0 entries), or all channels when there is no cdef box, for test 1 and test 5.
Check that tests 2 (exactly one APPROX 0x01 when there is more than one colour specification) and 3 (METH 1, 2 or 3)
apply whether or not the image dictionary has ColorSpace, as the clause does. Rewrite the class docs to cite the clause
and 15444-1 I.5.3.6, say where veraPDF differs (it counts all channels, and checks APPROX and METH only without
ColorSpace), and drop the sentence that the rule was checked only against veraPDF for these tests.
Acceptance
- A JP2 with
cdefgrey + opacity: no test 1 finding; grey 8-bit + opacity 4-bit: no test 5 finding. - A JP2 with no
cdefand 2 channels: test 1 finding. RGB + opacity of 16 bits with RGB at 8: no finding; RGB channels
of different depths: finding. - Two colr boxes with APPROX 0 and an image dictionary that has
ColorSpace: test 2 finding. ConformanceCatalogand the parity tests against veraPDF updated, with each place veraPDF disagrees named in the test.
Split from #418 for v2.4 because #787 (the JP2 loader) applies the same clause in the same release.
Activity
fix(conformance): number JP2 channels through cmap and cdef (#792)
fix(conformance): read each JPEG 2000 box through one table of its sh…
test(conformance): make the JPEG 2000 row tests see a swallowed throw (…
test(conformance): let the NPC row of a palette be refused on its own (…
docs(conformance): state the JPEG 2000 box table once and point every…
docs(conformance): name the creg rows G1 and G2 (#792)
fix(conformance): list every box requirement with its scope and effect (
refactor(conformance): ask D4 to D6 one by one in a JPX file no JP2 r…
docs(conformance): say what the JPEG 2000 table lists and what a fail…
style(conformance): keep the row-test helper comments within 100 colu…
fix(conformance): drop the M.11.7.5 relaxation and list ftyp, bpcc an…
docs(conformance): say the File Type, bpcc and colr rows and what M.1…
fix(conformance): narrow the JPEG 2000 table to seven boxes, read col…
docs(conformance): claim seven boxes, point to the table for effects (#…
fix(conformance): pair a bpcc with its ihdr, cut the table prose (#792)
docs(conformance): drop the effect summaries, state the probe counts (#…
fix(conformance): say what the I5 and D rows leave unread, pin it (#792)
docs(conformance): a row is a requirement, a definition or a reading (#…