pub struct RawBitmap {
pub data: Vec<u8>,
pub width: u32,
pub height: u32,
pub bit_depth: u8,
pub signed: bool,
pub component_signed: Vec<bool>,
pub num_components: u16,
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).
signed: boolWhether every component in this packed bitmap is signed.
Use Self::component_signed for per-component signedness when
handling arbitrary JPEG 2000 component metadata.
component_signed: Vec<bool>Per-component signedness in codestream/component order.
num_components: u16The number of components (e.g., 1 for grayscale, 3 for RGB).
bytes_per_sample: u8Bytes per sample in the packed little-endian native representation.
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more