pub struct Unpacked<'a> { /* private fields */ }Expand description
The unpack stage: Packed samples widened to a byte per component, one
row at a time into a buffer it owns and reuses.
The row this yields is exactly the row the eager pass wrote into its
full-size buffer — same table, same rounding, same treatment of a short or
absent row — so putting the stage in front of
crate::image::Converted changes when the arithmetic runs and not what
it produces.
Implementations§
Source§impl<'a> Unpacked<'a>
impl<'a> Unpacked<'a>
Sourcepub fn next_row(&mut self) -> Option<&[u8]>
pub fn next_row(&mut self) -> Option<&[u8]>
The next row widened to a byte per component, or None past the
bottom.
A row the stream never reached yields zeroes, not the byte
/Decode maps a zero sample to: PDFium returns a zeroed output
buffer for an absent row without ever running the decode, so the pixels
are literal black – the distinction the scanline reader’s
Availability carries.
Sourcepub fn collect_all(self) -> Box<[u8]>
pub fn collect_all(self) -> Box<[u8]>
The whole image unpacked, for the callers that genuinely want it.
The one place the full-size buffer this stage exists to avoid is built:
crate::image::Samples::to_pixels, reached by the CLI’s image
export, the facade’s edit path and the stencil check.