#[non_exhaustive]pub struct Header {
pub width: u32,
pub height: u32,
pub components: Vec<ComponentInfo>,
pub max_reduction: u8,
pub jp2: Option<Jp2Metadata>,
}Expand description
An image’s header: what decode would return, without
the samples.
The struct is #[non_exhaustive], so more of the header can be added
without a breaking change.
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.width: u32The image area’s width, as Image::width: on
the reduced grid under a resolution reduction.
height: u32The image area’s height, as Image::height:
on the reduced grid under a resolution reduction.
components: Vec<ComponentInfo>One entry per Image::components entry,
in the same order: for a palettized JP2 file, the palette’s channels.
max_reduction: u8The largest
resolution_reduction
the main header allows: the fewest decomposition levels any component
has in the main header’s COD and COC markers. A larger reduction is
Error::InvalidOptions. A tile-part
COD or COC with fewer levels can still refuse a reduction up to
this one, but only the decode finds that.
jp2: Option<Jp2Metadata>What decode would put on
Image::jp2: None for a raw codestream.