pub struct RgbaImage { /* private fields */ }Expand description
An RGBA8 image with straight alpha, rows stored top to bottom.
Implementations§
Source§impl RgbaImage
impl RgbaImage
Sourcepub fn new(
width: usize,
height: usize,
data: Vec<u8>,
) -> Result<Self, ImageSizeError>
pub fn new( width: usize, height: usize, data: Vec<u8>, ) -> Result<Self, ImageSizeError>
Wraps data (width * height * 4 bytes, row-major, top row first).
Sourcepub fn transparent(width: usize, height: usize) -> Self
pub fn transparent(width: usize, height: usize) -> Self
A fully transparent image.
Trait Implementations§
impl Eq for RgbaImage
impl StructuralPartialEq for RgbaImage
Auto Trait Implementations§
impl Forget for RgbaImage
impl Freeze for RgbaImage
impl Move for RgbaImage
impl RefUnwindSafe for RgbaImage
impl Send for RgbaImage
impl Sync for RgbaImage
impl Unpin for RgbaImage
impl UnsafeUnpin for RgbaImage
impl UnwindSafe for RgbaImage
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