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<CroppedChannels<Channels>> for CroppedChannels<Channels>
impl<Channels: PartialEq> PartialEq<CroppedChannels<Channels>> 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