Enum exr::image::Levels [−][src]
pub enum Levels<Samples> { Singular(Samples), Mip { rounding_mode: RoundingMode, level_data: LevelMaps<Samples>, }, Rip { rounding_mode: RoundingMode, level_data: RipMaps<Samples>, }, }
Expand description
One or multiple resolution levels of the same image.
Samples
can be FlatSamples
.
Variants
A single image without smaller versions of itself.
If you only want to handle exclusively this case, use Samples
directly, and not Levels<Samples>
.
Contains uniformly scaled smaller versions of the original.
Show fields
Fields of Mip
rounding_mode: RoundingMode
Whether to round up or down when calculating Mip/Rip levels.
level_data: LevelMaps<Samples>
The smaller versions of the original.
Contains any possible combination of smaller versions of the original.
Show fields
Fields of Rip
rounding_mode: RoundingMode
Whether to round up or down when calculating Mip/Rip levels.
level_data: RipMaps<Samples>
The smaller versions of the original.
Implementations
impl<LevelSamples> Levels<LevelSamples>
[src]
impl<LevelSamples> Levels<LevelSamples>
[src]pub fn get_level(&self, level: Vec2<usize>) -> Result<&LevelSamples>
[src]
pub fn get_level(&self, level: Vec2<usize>) -> Result<&LevelSamples>
[src]Get a resolution level by index, sorted by size, decreasing.
pub fn get_level_mut(&mut self, level: Vec2<usize>) -> Result<&mut LevelSamples>
[src]
pub fn get_level_mut(&mut self, level: Vec2<usize>) -> Result<&mut LevelSamples>
[src]Get a resolution level by index, sorted by size, decreasing.
pub fn levels_as_slice(&self) -> &[LevelSamples]ⓘ
[src]
pub fn levels_as_slice(&self) -> &[LevelSamples]ⓘ
[src]Get a slice of all resolution levels, sorted by size, decreasing.
pub fn levels_as_slice_mut(&mut self) -> &mut [LevelSamples]ⓘ
[src]
pub fn levels_as_slice_mut(&mut self) -> &mut [LevelSamples]ⓘ
[src]Get a mutable slice of all resolution levels, sorted by size, decreasing.
pub fn level_mode(&self) -> LevelMode
[src]
pub fn level_mode(&self) -> LevelMode
[src]Whether this stores multiple resolution levels.
Trait Implementations
impl<S> ValidateResult for Levels<S> where
S: ValidateResult,
[src]
impl<S> ValidateResult for Levels<S> where
S: ValidateResult,
[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, LevelSamples> WritableSamples<'samples> for Levels<LevelSamples> where
LevelSamples: WritableLevel<'samples>,
[src]
impl<'samples, LevelSamples> WritableSamples<'samples> for Levels<LevelSamples> where
LevelSamples: WritableLevel<'samples>,
[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 = LevelsWriter<LevelSamples::Writer>
type Writer = LevelsWriter<LevelSamples::Writer>
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<Samples: Eq> Eq for Levels<Samples>
[src]
impl<Samples> StructuralEq for Levels<Samples>
[src]
impl<Samples> StructuralPartialEq for Levels<Samples>
[src]
Auto Trait Implementations
impl<Samples> RefUnwindSafe for Levels<Samples> where
Samples: RefUnwindSafe,
Samples: RefUnwindSafe,
impl<Samples> Send for Levels<Samples> where
Samples: Send,
Samples: Send,
impl<Samples> Sync for Levels<Samples> where
Samples: Sync,
Samples: Sync,
impl<Samples> Unpin for Levels<Samples> where
Samples: Unpin,
Samples: Unpin,
impl<Samples> UnwindSafe for Levels<Samples> where
Samples: UnwindSafe,
Samples: UnwindSafe,
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