pub struct RawBitmap {
pub data: Vec<u8>,
pub width: u32,
pub height: u32,
pub bit_depth: u8,
pub num_components: u8,
pub bytes_per_sample: u8,
}Expand description
Raw decoded pixel data at native bit depth (no 8-bit scaling).
For bit depths ≤ 8, data contains one byte per sample.
For bit depths > 8 (e.g., 12 or 16), data contains two bytes per sample
in little-endian byte order (u16 LE).
Samples are interleaved: for a 3-component image, the layout is
[R0, G0, B0, R1, G1, B1, ...].
Fields§
§data: Vec<u8>The raw pixel data at native bit depth.
width: u32The width of the image in pixels.
height: u32The height of the image in pixels.
bit_depth: u8The original bit depth per sample (e.g., 8, 12, 16).
num_components: u8The number of components (e.g., 1 for grayscale, 3 for RGB).
bytes_per_sample: u8Bytes per sample: 1 for bit_depth ≤ 8, 2 for bit_depth > 8.
Auto Trait Implementations§
impl Freeze for RawBitmap
impl RefUnwindSafe for RawBitmap
impl Send for RawBitmap
impl Sync for RawBitmap
impl Unpin for RawBitmap
impl UnsafeUnpin for RawBitmap
impl UnwindSafe for RawBitmap
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