[−][src]Struct openexr::frame_buffer::FrameBuffer  
Points to and describes in-memory image data for reading.
Methods
impl<'a> FrameBuffer<'a>[src]
pub fn new(width: u32, height: u32) -> Self[src]
Creates an empty frame buffer with the given dimensions in pixels.
pub fn new_with_origin(
    origin_x: i32, 
    origin_y: i32, 
    width: u32, 
    height: u32
) -> Self[src]
origin_x: i32,
origin_y: i32,
width: u32,
height: u32
) -> Self
Creates an empty frame buffer with the given dimensions and the given origin coordinate.
This is necessary if you want to write an OpenEXR file with a data window that has in min coordinate other than (0, 0). For example, if the data window of the EXR is (-2, -3) to (90, 56), then you pass (-2, -3) as the origin parameter here.
pub fn dimensions(&self) -> (u32, u32)[src]
Return the dimensions of the frame buffer.
pub fn origin(&self) -> (i32, i32)[src]
Return the origin of the frame buffer.
pub fn insert_channel<T: PixelData>(
    &mut self, 
    name: &str, 
    data: &'a [T]
) -> &mut Self[src]
&mut self,
name: &str,
data: &'a [T]
) -> &mut Self
Insert a single channel into the FrameBuffer.
The channel will be given the name name.
data is the memory for the channel and should contain precisely
width * height elements, where width and height are the dimensions
of the FrameBuffer.
pub fn insert_channels<T: PixelStruct>(
    &mut self, 
    names: &[&str], 
    data: &'a [T]
) -> &mut Self[src]
&mut self,
names: &[&str],
data: &'a [T]
) -> &mut Self
Insert multiple channels from a slice of structs or tuples.
The number of channels to be inserted is determined by the
implementation of the PixelStruct trait on T.  names should
contain the names of each of those channels.
data is the memory for the channel and should contain precisely
width * height elements, where width and height are the dimensions
of the FrameBuffer.
pub unsafe fn insert_raw(
    &mut self, 
    name: &str, 
    type_: PixelType, 
    base: *const c_char, 
    stride: (usize, usize), 
    sampling: (c_int, c_int), 
    fill_value: f64, 
    tile_coords: (bool, bool)
) -> &mut Self[src]
&mut self,
name: &str,
type_: PixelType,
base: *const c_char,
stride: (usize, usize),
sampling: (c_int, c_int),
fill_value: f64,
tile_coords: (bool, bool)
) -> &mut Self
The raw method for inserting a new channel.
This is very unsafe: the other methods should be preferred unless you have a special use-case.
This method corresponds directly to constructing and then inserting a "Slice" in the C++ OpenEXR library. Please see its documentation for details.
Trait Implementations
impl<'a> Drop for FrameBuffer<'a>[src]
Auto Trait Implementations
impl<'a> !Send for FrameBuffer<'a>
impl<'a> !Sync for FrameBuffer<'a>
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
    U: From<T>, [src]
U: From<T>,
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> BorrowMut<T> for T where
    T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
    T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
    T: 'static + ?Sized, [src]
T: 'static + ?Sized,