pub struct Image { /* private fields */ }
Implementations§
§impl Image
impl Image
pub fn from_srgba(
data: &[[u8; 4]],
width: usize,
height: usize,
) -> Result<Image, ImageError>
pub fn from_srgba( data: &[[u8; 4]], width: usize, height: usize, ) -> Result<Image, ImageError>
Creates an image from sRGB
color channels and linear alpha.
The boxed array size must match the image dimensions.
pub fn from_linear_rgba( data: &[[f32; 4]], width: usize, height: usize, ) -> Result<Image, ImageError>
pub fn id(&self) -> ImageId
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn data(&self) -> &[[f16; 4]]
Trait Implementations§
impl Eq for Image
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)