pub struct Decoded {
pub pixels: Vec<u8>,
pub size: DecodePixels,
pub measured: Measured,
}Expand description
A decoded picture, ready to become a renderer’s handle.
Fields§
§pixels: Vec<u8>RGBA8, row-major, size.width * size.height * 4 bytes.
size: DecodePixelsThe size of pixels — what was kept, which is at or under both
the budget and the source.
measured: MeasuredWhat the header said, before any of this. Kept so a viewer can show the picture’s real dimensions rather than the decoded ones — an info panel that reports what it happened to decode would be lying about the file.
Trait Implementations§
Source§impl Debug for Decoded
Deliberately hand-written: the derived one would render several
megabytes of pixel data into a log line.
impl Debug for Decoded
Deliberately hand-written: the derived one would render several megabytes of pixel data into a log line.
Not the keystroke rule, but the same habit — a Debug that dumps a
buffer is a Debug nobody can use, and someone debugging a viewer is
debugging sizes, not pixel values.
impl Eq for Decoded
impl StructuralPartialEq for Decoded
Auto Trait Implementations§
impl Freeze for Decoded
impl RefUnwindSafe for Decoded
impl Send for Decoded
impl Sync for Decoded
impl Unpin for Decoded
impl UnsafeUnpin for Decoded
impl UnwindSafe for Decoded
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more