pub enum ImageSource {
Encoded(Vec<u8>),
Rgba {
width: u32,
height: u32,
pixels: Vec<u8>,
},
Bgra {
width: u32,
height: u32,
pixels: Vec<u8>,
},
}Expand description
O conteúdo de uma Image.
Variants§
Encoded(Vec<u8>)
Arquivo de imagem como está no disco (o canvas decodifica).
Rgba
Pixels RGBA (4 bytes por pixel, linha a linha, sem pré-multiplicar o alfa).
Bgra
Pixels BGRA (a ordem que decodificadores de vídeo e o Windows costumam entregar), opacos ou já pré-multiplicados: o Direct2D os usa sem converter.
Trait Implementations§
Source§impl Debug for ImageSource
impl Debug for ImageSource
Source§impl PartialEq for ImageSource
impl PartialEq for ImageSource
impl StructuralPartialEq for ImageSource
Auto Trait Implementations§
impl Forget for ImageSource
impl Freeze for ImageSource
impl Move for ImageSource
impl RefUnwindSafe for ImageSource
impl Send for ImageSource
impl Sync for ImageSource
impl Unpin for ImageSource
impl UnsafeUnpin for ImageSource
impl UnwindSafe for ImageSource
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