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: ImageAttributesAttributes 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: LayersThe layers contained in the image file. Can be either a single
Layeror a list of layers.
Implementations
impl Image<NoneMore>
const fn empty(attributes: ImageAttributes) -> SelfCreate 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>) -> SelfUses 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) -> SelfUses empty attributes.
fn from_channels(size: impl Into<Vec2<usize>>, channels: ChannelData) -> SelfUses 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>>) -> SelfCreate an image with multiple layers. The layer can be a
Vec<Layer>orLayers(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) -> SelfCreate an image with one or multiple layers. The layer can be a
Layer, orLayerssmall vector, orVec<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