pub struct Bgra<'a> {
data: &'a [u8],
width: u32,
height: u32,
}Expand description
Uncompressed 32-bit color pixels.
Pixels are premultiplied, in BGRA order and in the sRGB color space.
Fields§
§data: &'a [u8]§width: u32§height: u32Implementations§
Source§impl<'a> Bgra<'a>
impl<'a> Bgra<'a>
Sourcepub fn new(data: &'a [u8], width: u32, height: u32) -> Option<Bgra<'a>>
pub fn new(data: &'a [u8], width: u32, height: u32) -> Option<Bgra<'a>>
Creates a view of data as width by height pixels of four bytes
each.
Returns None if data is too short.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Bgra<'a>
impl<'a> RefUnwindSafe for Bgra<'a>
impl<'a> Send for Bgra<'a>
impl<'a> Sync for Bgra<'a>
impl<'a> Unpin for Bgra<'a>
impl<'a> UnsafeUnpin for Bgra<'a>
impl<'a> UnwindSafe for Bgra<'a>
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