[][src]Struct tray_rust::film::image::Image

pub struct Image { /* fields omitted */ }

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]

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

impl Debug for Image[src]

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]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T[src]