[−][src]Struct tray_rust::film::image::Image
Methods
impl Image
[src]
pub fn new(dimensions: (usize, usize)) -> Image
[src]
pub fn add_pixels(&mut self, pixels: &[f32])
[src]
Add the floating point RGBAf32 pixels to the image. It is assumed that pixels
contains
a dim.0
by dim.1
pixel image.
pub fn add_blocks(
&mut self,
block_size: (usize, usize),
blocks: &[(usize, usize)],
pixels: &[f32]
)
[src]
&mut self,
block_size: (usize, usize),
blocks: &[(usize, usize)],
pixels: &[f32]
)
Add the blocks of RGBAf32 pixels to the image. It's assumed that the block information
passed is equivalent to that returned by RenderTarget::get_blocks. block_size
specifies
the size of the blocks being passed, blocks
contains the start points of each block and
pixels
contains block_size.0 * block_size.1 * 4
floats for each block.
pub fn get_srgb8(&self) -> Vec<u8>
[src]
Convert the Image to sRGB8 format and return it
pub fn dimensions(&self) -> (usize, usize)
[src]
Trait Implementations
Auto Trait Implementations
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
impl RefUnwindSafe for Image
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,