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§
source§impl<'s, LayerData> Image<LayerData>where
LayerData: WritableLayers<'s> + 's,
impl<'s, LayerData> Image<LayerData>where
LayerData: WritableLayers<'s> + 's,
sourcepub fn new(image_attributes: ImageAttributes, layer_data: LayerData) -> Self
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,
impl<'s, Channels> Image<Layers<Channels>>where
Channels: WritableChannels<'s> + 's,
sourcepub fn from_layers(
image_attributes: ImageAttributes,
layer_data: impl Into<Layers<Channels>>,
) -> Self
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).
source§impl<'s, ChannelData> Image<Layer<ChannelData>>where
ChannelData: WritableChannels<'s> + 's,
impl<'s, ChannelData> Image<Layer<ChannelData>>where
ChannelData: WritableChannels<'s> + 's,
sourcepub fn from_layer(layer: Layer<ChannelData>) -> Self
pub fn from_layer(layer: Layer<ChannelData>) -> Self
Uses the display position and size to the channel position and size of the layer.
sourcepub fn from_encoded_channels(
size: impl Into<Vec2<usize>>,
encoding: Encoding,
channels: ChannelData,
) -> Self
pub fn from_encoded_channels( size: impl Into<Vec2<usize>>, encoding: Encoding, channels: ChannelData, ) -> Self
Uses empty attributes.
sourcepub fn from_channels(
size: impl Into<Vec2<usize>>,
channels: ChannelData,
) -> Self
pub fn from_channels( size: impl Into<Vec2<usize>>, channels: ChannelData, ) -> Self
Uses empty attributes and fast compression.
source§impl Image<NoneMore>
impl Image<NoneMore>
sourcepub fn empty(attributes: ImageAttributes) -> Self
pub 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.
source§impl<'s, InnerLayers> Image<InnerLayers>where
InnerLayers: WritableLayers<'s> + 's,
impl<'s, InnerLayers> Image<InnerLayers>where
InnerLayers: WritableLayers<'s> + 's,
sourcepub fn with_layer<NewChannels>(
self,
layer: Layer<NewChannels>,
) -> Image<Recursive<InnerLayers, Layer<NewChannels>>>where
NewChannels: 's + WritableChannels<'s>,
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.
Trait Implementations§
source§impl<C> ValidateResult for Image<C>where
C: ValidateResult,
impl<C> ValidateResult for Image<C>where
C: ValidateResult,
source§fn validate_result(
&self,
other: &Self,
options: ValidationOptions,
location: impl Fn() -> String,
) -> ValidationResult
fn validate_result( &self, other: &Self, options: ValidationOptions, location: impl Fn() -> String, ) -> ValidationResult
source§fn assert_equals_result(&self, result: &Self)
fn assert_equals_result(&self, result: &Self)
source§impl<'img, WritableLayers> WritableImage<'img, WritableLayers> for &'img Image<WritableLayers>
impl<'img, WritableLayers> WritableImage<'img, WritableLayers> for &'img Image<WritableLayers>
impl<Layers> 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> UnwindSafe for Image<Layers>where
Layers: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)