pub struct Image<T> {
pub data: Vec<T>,
pub width: usize,
pub height: usize,
pub channels: u8,
pub transform: Transform,
}
Expand description
Represents the final RGB Image.
Fields§
§data: Vec<T>
Pixel data stored in a linear fashion.
width: usize
Width of the image.
height: usize
Height of the image.
channels: u8
The number of color channels in the image.
We can assume this will be 3 for all non-obscure, modern cameras. See https://github.com/GraphiteEditor/Graphite/pull/1923#discussion_r1725070342 for more information.
transform: Transform
The transformation required to orient the image correctly.
This will be Transform::Horizontal
after the transform step is applied.
Implementations§
Source§impl Image<u16>
impl Image<u16>
pub fn apply(self, transform: impl PixelTransform) -> Image<u16>
pub fn transform_and_apply(self, transform: impl PixelTransform) -> Image<u16>
Auto Trait Implementations§
impl<T> Freeze for Image<T>
impl<T> RefUnwindSafe for Image<T>where
T: RefUnwindSafe,
impl<T> Send for Image<T>where
T: Send,
impl<T> Sync for Image<T>where
T: Sync,
impl<T> Unpin for Image<T>where
T: Unpin,
impl<T> UnwindSafe for Image<T>where
T: UnwindSafe,
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