#[non_exhaustive]pub enum Codec {
Dct,
Ccitt,
Jbig2,
Jpx,
Jxl,
}Expand description
Which terminal image codec a /Filter chain ends in.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Dct
DCTDecode / DCT (§7.4.8) — JPEG, ITU-T T.81.
Ccitt
CCITTFaxDecode / CCF (§7.4.6) — Group 3/4 fax, T.4/T.6.
Jbig2
JBIG2Decode (§7.4.7) — ITU-T T.88.
Jpx
JPXDecode (§7.4.9) — JPEG 2000, ITU-T T.800.
Jxl
JXLDecode — JPEG XL, ISO/IEC 18181. Not in ISO 32000: the
de-facto name PDFium and PdfCraft read. Every image sets
CodecNotes::jxl_nonstandard.
Implementations§
Source§impl Codec
impl Codec
Sourcepub const fn name(self) -> &'static str
pub const fn name(self) -> &'static str
The canonical (unabbreviated) filter name, for diagnostics.
Sourcepub const fn is_self_describing(self) -> bool
pub const fn is_self_describing(self) -> bool
Does the codestream carry its own colour space, bit depth and
alpha, so that Table 89’s JPXDecode rules apply: /ColorSpace
optional (the dictionary wins when present), /BitsPerComponent
ignored, /Decode ignored unless /ImageMask. True for Jpx
and for the non-standard Jxl, which readers treat the same way.
Sourcepub const fn allowed_inline(self) -> bool
pub const fn allowed_inline(self) -> bool
May this codec appear in an inline image (BI/ID/EI)?
§8.9.7 restricts inline-image filters, and §7.4.7 states the
JBIG2 case outright: JBIG2-encoded data may not be used in an
inline image. JPXDecode is likewise excluded from Table 94’s
abbreviation set and from the inline-image filter list. DCT
and CCF are legal inline abbreviations (Table 94), so both
route through the ordinary path.