#[non_exhaustive]pub struct CodecNotes {
pub geometry_mismatch: bool,
pub cmyk_image: bool,
pub cmyk_polarity_unverifiable: bool,
pub jpx_smask_in_data_preblended: bool,
pub jpx_palette_left_to_pdf: bool,
pub jxl_nonstandard: bool,
pub lzw_framing_anomalies: usize,
}Expand description
Per-image honesty counters produced by the codec layer (decision 005 §6.4; the same disclosure discipline as rule R20).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.geometry_mismatch: boolThe codestream’s geometry disagreed with the image dictionary
(/Width, /Height, /BitsPerComponent, or the component
count implied by /ColorSpace). For JPX the codestream wins
by Table 89; for DCT a mismatch is a producer bug. Counted
either way, never silent.
cmyk_image: boolThis is a 4-component DCT image whose effective ColorTransform
is 1 or 2 (YCCK/YUVK storage) — the benign census half of
decision 006 §4.4’s split. The mandated YCCK→CMYK inverse ran
(TN #5116 §13.1; it recovers true ink directly), the samples
carry no residual polarity ambiguity, and pdfcer’s output
pixel-matches pdfium on every such file in the corpus (9 as of
2026-07-31 — the earlier “zero exist” claim here was wrong
twice over; see 005’s addenda). A pure volume counter: no
warning is warranted (rule R30 covers the shape that does
warrant one, below).
cmyk_polarity_unverifiable: boolThis is a 4-component DCT image with effective ColorTransform
0 (raw CMYK storage) and no /Decode array — the one
shape where the undocumented Photoshop inverted-storage
convention can still produce a photographic negative, because
neither the codestream nor the dictionary disambiguates the
polarity (decision 006 §5.3/§5.4, rule R30). Reported,
never repaired: all four reference engines render this shape
un-inverted and share the gap; pdfcer’s differentiator is that
it names it. Zero exist in the conformance corpus (the 9
four-component files are all transform 2).
jpx_smask_in_data_preblended: boolThis JPX image’s /SMaskInData is 2: Table 89’s “the
image’s data stream includes colour channels that have been
preblended with a background; the image data also includes an
opacity channel”, for which a reader “may create a soft-mask
image with a Matte entry”.
Recognized and deferred, never approximated (see jpx). The
colour samples are returned exactly as stored — i.e. already
composited over that backdrop, which is a recognizable picture
rather than a grey box — and the opacity channel is not
exposed, because using it without un-premultiplying would
double-darken every partially transparent pixel. Un-premultiplying
needs the Matte backdrop colour and clause 11’s transparency
model, which decision 005 §7 assigns to ROADMAP.md Pass 1.1
item 6.3.
jpx_palette_left_to_pdf: boolA JP2 palette was left unresolved because the image dictionary
carries its own /Indexed colour space (§8.9 Table 89).
§Why this is worth a field rather than being silent
Two lookup tables describe the same image — the codestream’s
pclr/cmap boxes and the PDF’s /Indexed array — and exactly
one of them may be applied. Applying both maps a colour value
through a palette a second time and paints whatever entry that
index happens to hit, or black when it hits nothing.
So this records which authority won, and it is not a shortfall: Table 89 makes the dictionary’s space the answer whenever it is present. It is disclosed because the decision is invisible in the output — a correct render and a double-resolved one are both just coloured pixels, and the difference only shows up as the wrong colour, which nothing downstream can detect.
jxl_nonstandard: boolThe image used the non-standard /JXLDecode filter (JPEG XL). It
decoded, but a conforming PDF reader need not display it, so the
shells disclose it; preflight flags it.
lzw_framing_anomalies: usizeLZW framing anomalies seen in the byte-stream prefix of the
chain (see FilterNotes::lzw_framing_anomalies).