pub struct Bitmap {
pub color_space: ColorSpace,
pub data: Vec<u8>,
pub has_alpha: bool,
pub width: u32,
pub height: u32,
pub original_bit_depth: u8,
}Expand description
A bitmap storing the decoded result of the image.
Fields§
§color_space: ColorSpaceThe color space of the image.
data: Vec<u8>The raw pixel data of the image. The result will always be in 8-bit (in case the original image had a different bit-depth, hayro-jpeg2000 always scales to 8-bit).
The size is guaranteed to equal
width * height * (num_channels + (if has_alpha { 1 } else { 0 }).
Pixels are interleaved on a per-channel basis, the alpha channel always
appearing as the last channel, if available.
has_alpha: boolWhether the image has an alpha channel.
width: u32The width of the image.
height: u32The height of the image.
original_bit_depth: u8The original bit depth of the image. You usually don’t need to do anything with this parameter, it just exists for informational purposes.
Auto Trait Implementations§
impl Freeze for Bitmap
impl RefUnwindSafe for Bitmap
impl Send for Bitmap
impl Sync for Bitmap
impl Unpin for Bitmap
impl UnwindSafe for Bitmap
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