exr::image

Type Alias PixelLayersImage

Source
pub type PixelLayersImage<Storage, Channels> = Image<Layers<SpecificChannels<Storage, Channels>>>;
Expand description

This image type contains multiple layers, with each layer containing a user-defined type of pixels.

Aliased Type§

struct PixelLayersImage<Storage, Channels> {
    pub attributes: ImageAttributes,
    pub layer_data: SmallVec<[Layer<SpecificChannels<Storage, Channels>>; 2]>,
}

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: SmallVec<[Layer<SpecificChannels<Storage, Channels>>; 2]>

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

Implementations

Source§

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

Source

pub 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.

Source§

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

Source

pub 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].

Source§

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

Source

pub 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).

Trait Implementations

Source§

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

Source§

fn clone(&self) -> Image<Layers>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

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

Source§

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

Formats the value using the given formatter. Read more
Source§

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

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

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

Source§

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

Compare self with the other. Exceptional behaviour: Read more
Source§

fn assert_equals_result(&self, result: &Self)

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

impl<Layers> StructuralPartialEq for Image<Layers>