Enum exr::image::FlatSamples [−][src]
Expand description
A vector of non-deep values (one value per pixel per channel).
Stores row after row in a single vector.
The precision of all values is either f16
, f32
or u32
.
Since this is close to the pixel layout in the byte file,
this will most likely be the fastest storage.
Using a different storage, for example SpecificChannels
,
will probably be slower.
Variants
A vector of non-deep f16
values.
A vector of non-deep f32
values.
A vector of non-deep u32
values.
Implementations
impl FlatSamples
[src]
impl FlatSamples
[src]pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
[src]The number of samples in the image. Should be the width times the height. Might vary when subsampling is used.
pub fn values_as_f32<'s>(&'s self) -> impl 's + Iterator<Item = f32>
[src]
pub fn values_as_f32<'s>(&'s self) -> impl 's + Iterator<Item = f32>
[src]Views all samples in this storage as f32. Matches the underlying sample type again for every sample, match yourself if performance is critical! Does not allocate.
pub fn values<'s>(&'s self) -> impl 's + Iterator<Item = Sample>
[src]
pub fn values<'s>(&'s self) -> impl 's + Iterator<Item = Sample>
[src]All samples in this storage as iterator. Matches the underlying sample type again for every sample, match yourself if performance is critical! Does not allocate.
pub fn value_by_flat_index(&self, index: usize) -> Sample
[src]
pub fn value_by_flat_index(&self, index: usize) -> Sample
[src]Lookup a single value, by flat index.
The flat index can be obtained using Vec2::flatten_for_width
which computes the index in a flattened array of pixel rows.
Trait Implementations
impl Clone for FlatSamples
[src]
impl Clone for FlatSamples
[src]fn clone(&self) -> FlatSamples
[src]
fn clone(&self) -> FlatSamples
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for FlatSamples
[src]
impl Debug for FlatSamples
[src]impl PartialEq<FlatSamples> for FlatSamples
[src]
impl PartialEq<FlatSamples> for FlatSamples
[src]fn eq(&self, other: &FlatSamples) -> bool
[src]
fn eq(&self, other: &FlatSamples) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &FlatSamples) -> bool
[src]
fn ne(&self, other: &FlatSamples) -> bool
[src]This method tests for !=
.
impl ValidateResult for FlatSamples
[src]
impl ValidateResult for FlatSamples
[src]fn validate_result(
&self,
other: &Self,
options: ValidationOptions,
location: String
) -> ValidationResult
[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]
fn assert_equals_result(&self, result: &Self)
[src]Compare self with the other. Panics if not equal. Read more
impl<'samples> WritableLevel<'samples> for FlatSamples
[src]
impl<'samples> WritableLevel<'samples> for FlatSamples
[src]fn sample_type(&self) -> SampleType
[src]
fn sample_type(&self) -> SampleType
[src]Generate the file meta data regarding the number type of these samples
type Writer = FlatSamplesWriter<'samples>
type Writer = FlatSamplesWriter<'samples>
The type of the temporary writer for this single level of samples
fn create_level_writer(&'samples self, size: Vec2<usize>) -> Self::Writer
[src]
fn create_level_writer(&'samples self, size: Vec2<usize>) -> Self::Writer
[src]Create a temporary writer for this single level of samples
impl<'samples> WritableSamples<'samples> for FlatSamples
[src]
impl<'samples> WritableSamples<'samples> for FlatSamples
[src]fn sample_type(&self) -> SampleType
[src]
fn sample_type(&self) -> SampleType
[src]Generate the file meta data regarding the number type of this storage
fn infer_level_modes(&self) -> (LevelMode, RoundingMode)
[src]
fn infer_level_modes(&self) -> (LevelMode, RoundingMode)
[src]Generate the file meta data regarding resolution levels
type Writer = FlatSamplesWriter<'samples>
type Writer = FlatSamplesWriter<'samples>
The type of the temporary writer for this sample storage
fn create_samples_writer(&'samples self, header: &Header) -> Self::Writer
[src]
fn create_samples_writer(&'samples self, header: &Header) -> Self::Writer
[src]Create a temporary writer for this sample storage
impl StructuralPartialEq for FlatSamples
[src]
Auto Trait Implementations
impl RefUnwindSafe for FlatSamples
impl Send for FlatSamples
impl Sync for FlatSamples
impl Unpin for FlatSamples
impl UnwindSafe for FlatSamples
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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