#[non_exhaustive]pub struct Image {
pub width: u32,
pub height: u32,
pub components: Vec<Component>,
}Expand description
A decoded image: the image area on the reference grid, plus its components.
width and height describe the reference
grid image area (Xsiz - XOsiz by Ysiz - YOsiz), which is the coordinate
space the components are registered against. A sub-sampled component covers
that same area with fewer samples, so its own
Component::width/Component::height can be smaller. With unit
sub-sampling — the common case — they are equal.
Components are in SIZ order and are independent: no inter-component (color) transform is applied here.
The struct is #[non_exhaustive]: decode is the normal
producer, and later metadata (a JP2 wrapper’s colour description, say) can
then land as new fields without a breaking change. To build one by hand —
an expected image in a test harness, for instance — use Image::new.
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: u32Reference-grid image area width, in reference-grid points.
height: u32Reference-grid image area height, in reference-grid points.
components: Vec<Component>One entry per SIZ component, in SIZ order. Never empty in decoder output.