Struct exr::image::crop::CroppedChannels
source · pub struct CroppedChannels<Channels> {
pub full_channels: Channels,
pub full_bounds: IntegerBounds,
pub cropped_bounds: IntegerBounds,
}
Expand description
A smaller window into an existing pixel storage
Fields§
§full_channels: Channels
The uncropped pixel storage
full_bounds: IntegerBounds
The uncropped pixel storage bounds
cropped_bounds: IntegerBounds
The cropped pixel storage bounds
Implementations§
source§impl<Channels> CroppedChannels<Channels>
impl<Channels> CroppedChannels<Channels>
sourcepub fn crop_layer(
new_bounds: IntegerBounds,
layer: Layer<Channels>,
) -> Layer<CroppedChannels<Channels>>
pub fn crop_layer( new_bounds: IntegerBounds, layer: Layer<Channels>, ) -> Layer<CroppedChannels<Channels>>
Wrap a layer in a cropped view with adjusted bounds, but without reallocating your pixels
Trait Implementations§
source§impl<Channels: Clone> Clone for CroppedChannels<Channels>
impl<Channels: Clone> Clone for CroppedChannels<Channels>
source§fn clone(&self) -> CroppedChannels<Channels>
fn clone(&self) -> CroppedChannels<Channels>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<Channels: Debug> Debug for CroppedChannels<Channels>
impl<Channels: Debug> Debug for CroppedChannels<Channels>
source§impl<Channels: PartialEq> PartialEq for CroppedChannels<Channels>
impl<Channels: PartialEq> PartialEq for CroppedChannels<Channels>
source§fn eq(&self, other: &CroppedChannels<Channels>) -> bool
fn eq(&self, other: &CroppedChannels<Channels>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'slf, Channels> WritableChannels<'slf> for CroppedChannels<Channels>where
Channels: WritableChannels<'slf> + 'slf,
impl<'slf, Channels> WritableChannels<'slf> for CroppedChannels<Channels>where
Channels: WritableChannels<'slf> + 'slf,
source§fn infer_channel_list(&self) -> ChannelList
fn infer_channel_list(&self) -> ChannelList
Generate the file meta data for this list of channel
source§fn infer_level_modes(&self) -> (LevelMode, RoundingMode)
fn infer_level_modes(&self) -> (LevelMode, RoundingMode)
Generate the file meta data of whether and how resolution levels should be stored in the file
§type Writer = CroppedWriter<<Channels as WritableChannels<'slf>>::Writer>
type Writer = CroppedWriter<<Channels as WritableChannels<'slf>>::Writer>
The type of temporary writer
source§fn create_writer(&'slf self, header: &Header) -> Self::Writer
fn create_writer(&'slf self, header: &Header) -> Self::Writer
Create a temporary writer for this list of channels
impl<Channels: Eq> Eq for CroppedChannels<Channels>
impl<Channels> StructuralPartialEq for CroppedChannels<Channels>
Auto Trait Implementations§
impl<Channels> Freeze for CroppedChannels<Channels>where
Channels: Freeze,
impl<Channels> RefUnwindSafe for CroppedChannels<Channels>where
Channels: RefUnwindSafe,
impl<Channels> Send for CroppedChannels<Channels>where
Channels: Send,
impl<Channels> Sync for CroppedChannels<Channels>where
Channels: Sync,
impl<Channels> Unpin for CroppedChannels<Channels>where
Channels: Unpin,
impl<Channels> UnwindSafe for CroppedChannels<Channels>where
Channels: 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
Mutably borrows from an owned value. Read more