Struct Image

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

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 Image<NoneMore>

const fn empty(attributes: ImageAttributes) -> Self

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, ChannelData> Image<Layer<ChannelData>> where ChannelData: WritableChannels<'s> + 's,

fn from_layer(layer: Layer<ChannelData>) -> Self

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

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

Uses empty attributes.

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

Uses empty attributes and fast compression.

impl<'s, Channels> Image<Layers<Channels>> where Channels: WritableChannels<'s> + 's,

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

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

impl<'s, InnerLayers> Image<InnerLayers> where InnerLayers: WritableLayers<'s> + 's,

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

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

impl<'s, LayerData> Image<LayerData> where LayerData: WritableLayers<'s> + 's,

const fn new(image_attributes: ImageAttributes, layer_data: LayerData) -> Self

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

Trait Implementations

impl<C> ValidateResult for Image<C> where C: ValidateResult,

fn validate_result(&self, other: &Self, options: ValidationOptions, location: impl Fn() -> String) -> ValidationResult

impl<Layers: Clone> Clone for Image<Layers>

fn clone(&self) -> Self

impl<Layers: Debug> Debug for Image<Layers>

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

impl<Layers: PartialEq> PartialEq for Image<Layers>

fn eq(&self, other: &Self) -> bool

impl<Layers: PartialEq> StructuralPartialEq for Image<Layers>

Auto Trait Implementations

impl<Layers> Freeze for Image<Layers> where Layers: Freeze,

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> UnsafeUnpin for Image<Layers> where Layers: UnsafeUnpin,

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

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for Image<Layers> where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for Image<Layers> where ST: ?Sized, DT: ?Sized,

impl<T> Any for Image<Layers> where T: 'static + ?Sized,

impl<T> Borrow<T> for Image<Layers> where T: ?Sized,

impl<T> BorrowMut<T> for Image<Layers> where T: ?Sized,

impl<T> CloneToUninit for Image<Layers> where T: Clone,

impl<T> From<T> for Image<Layers>

impl<T> Pointable for Image<Layers>

impl<T> Read<Exclusive, BecauseExclusive> for Image<Layers> where T: ?Sized,

impl<T> ToOwned for Image<Layers> where T: Clone,

impl<T, U> Into<U> for Image<Layers> where U: From<T>,

impl<T, U> TryFrom<U> for Image<Layers> where U: Into<T>,

impl<T, U> TryInto<U> for Image<Layers> where U: TryFrom<T>,