pub struct PreviewImage<const WIDTH: usize, const HEIGHT: usize> { /* private fields */ }Expand description
A preview image.
Note that the red and blue channels are 5 bits, and the green channel is 6 bits.
Implementations§
Source§impl<const WIDTH: usize, const HEIGHT: usize> PreviewImage<WIDTH, HEIGHT>
impl<const WIDTH: usize, const HEIGHT: usize> PreviewImage<WIDTH, HEIGHT>
pub fn empty() -> Self
pub fn from_image(image: &RgbaImage) -> Self
pub fn from_image_scaled(image: &RgbaImage, filter: FilterType) -> Self
pub fn inner_data(&self) -> &[u16]
pub fn serializes<T: Serializer>(&self, serializer: &mut T)
pub fn deserializes(deserializer: &mut Deserializer<'_>) -> Self
pub fn set_pixel(&mut self, x: usize, y: usize, color: (f32, f32, f32))
pub fn get_pixel(&self, x: usize, y: usize) -> (f32, f32, f32)
Auto Trait Implementations§
impl<const WIDTH: usize, const HEIGHT: usize> Freeze for PreviewImage<WIDTH, HEIGHT>
impl<const WIDTH: usize, const HEIGHT: usize> RefUnwindSafe for PreviewImage<WIDTH, HEIGHT>
impl<const WIDTH: usize, const HEIGHT: usize> Send for PreviewImage<WIDTH, HEIGHT>
impl<const WIDTH: usize, const HEIGHT: usize> Sync for PreviewImage<WIDTH, HEIGHT>
impl<const WIDTH: usize, const HEIGHT: usize> Unpin for PreviewImage<WIDTH, HEIGHT>
impl<const WIDTH: usize, const HEIGHT: usize> UnwindSafe for PreviewImage<WIDTH, HEIGHT>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more