Struct exr::image::Image[][src]

pub struct Image<Layers> {
    pub attributes: ImageAttributes,
    pub layer_data: Layers,
}
Expand description

The complete exr image. Layers can be either a single Layer or Layers.

Fields

attributes: ImageAttributes

Attributes that apply to the whole image file. These attributes appear in each layer of the file. Excludes technical meta data. Each layer in this image also has its own attributes.

layer_data: Layers

The layers contained in the image file. Can be either a single Layer or a list of layers.

Implementations

impl<'s, LayerData: 's> Image<LayerData> where
    LayerData: WritableLayers<'s>, 
[src]

pub fn new(image_attributes: ImageAttributes, layer_data: LayerData) -> Self[src]

Create an image with one or multiple layers. The layer can be a Layer, or Layers small vector, or Vec<Layer> or &[Layer].

impl<'s, Channels: 's> Image<Layers<Channels>> where
    Channels: WritableChannels<'s>, 
[src]

pub fn from_layers(
    image_attributes: ImageAttributes,
    layer_data: impl Into<Layers<Channels>>
) -> Self
[src]

Create an image with multiple layers. The layer can be a Vec<Layer> or Layers (a small vector).

impl<'s, ChannelData: 's> Image<Layer<ChannelData>> where
    ChannelData: WritableChannels<'s>, 
[src]

pub fn from_layer(layer: Layer<ChannelData>) -> Self[src]

Uses the display position and size to the channel position and size of the layer.

pub fn from_encoded_channels(
    size: impl Into<Vec2<usize>>,
    encoding: Encoding,
    channels: ChannelData
) -> Self
[src]

Uses empty attributes.

pub fn from_channels(
    size: impl Into<Vec2<usize>>,
    channels: ChannelData
) -> Self
[src]

Uses empty attributes and fast compression.

impl Image<NoneMore>[src]

pub fn empty(attributes: ImageAttributes) -> Self[src]

Create an empty image, to be filled with layers later on. Add at least one layer to obtain a valid image. Call with_layer(another_layer) for each layer you want to add to this image.

impl<'s, InnerLayers: 's> Image<InnerLayers> where
    InnerLayers: WritableLayers<'s>, 
[src]

pub fn with_layer<NewChannels>(
    self,
    layer: Layer<NewChannels>
) -> Image<Recursive<InnerLayers, Layer<NewChannels>>> where
    NewChannels: 's + WritableChannels<'s>, 
[src]

Add another layer to this image. The layer type does not have to equal the existing layers in this image.

Trait Implementations

impl<Layers: Clone> Clone for Image<Layers>[src]

fn clone(&self) -> Image<Layers>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<Layers: Debug> Debug for Image<Layers>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<Layers: PartialEq> PartialEq<Image<Layers>> for Image<Layers>[src]

fn eq(&self, other: &Image<Layers>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Image<Layers>) -> bool[src]

This method tests for !=.

impl<C> ValidateResult for Image<C> where
    C: ValidateResult
[src]

fn validate_result(
    &self,
    other: &Self,
    options: ValidationOptions,
    location: String
) -> ValidationResult
[src]

Compare self with the other. Exceptional behaviour: Read more

fn assert_equals_result(&self, result: &Self)[src]

Compare self with the other. Panics if not equal. Read more

impl<'img, WritableLayers> WritableImage<'img, WritableLayers> for &'img Image<WritableLayers>[src]

fn write(self) -> WriteImageWithOptions<'img, WritableLayers, fn(_: f64)>[src]

Create a temporary writer which can be configured and used to write the image to a file.

impl<Layers> StructuralPartialEq for Image<Layers>[src]

Auto Trait Implementations

impl<Layers> RefUnwindSafe for Image<Layers> where
    Layers: RefUnwindSafe

impl<Layers> Send for Image<Layers> where
    Layers: Send

impl<Layers> Sync for Image<Layers> where
    Layers: Sync

impl<Layers> Unpin for Image<Layers> where
    Layers: Unpin

impl<Layers> UnwindSafe for Image<Layers> where
    Layers: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.