exr::image::read::layers

Trait ChannelsReader

Source
pub trait ChannelsReader {
    type Channels;

    // Required methods
    fn filter_block(&self, tile: TileCoordinates) -> bool;
    fn read_block(
        &mut self,
        header: &Header,
        block: UncompressedBlock,
    ) -> UnitResult;
    fn into_channels(self) -> Self::Channels;
}
Expand description

Processes pixel blocks from a file and accumulates them into multiple channels per layer.

Required Associated Types§

Source

type Channels

The type of the resulting channel collection

Required Methods§

Source

fn filter_block(&self, tile: TileCoordinates) -> bool

Specify whether a single block of pixels should be loaded from the file

Source

fn read_block( &mut self, header: &Header, block: UncompressedBlock, ) -> UnitResult

Load a single pixel block, which has not been filtered, into the reader, accumulating the channel data

Source

fn into_channels(self) -> Self::Channels

Deliver the final accumulated channel collection for the image

Implementors§

Source§

impl<PixelStorage, SetPixel, PxReader, Pixel> ChannelsReader for SpecificChannelsReader<PixelStorage, SetPixel, PxReader, Pixel>
where PxReader: RecursivePixelReader, PxReader::RecursivePixel: IntoTuple<Pixel>, PxReader::RecursiveChannelDescriptions: IntoNonRecursive, SetPixel: Fn(&mut PixelStorage, Vec2<usize>, Pixel),

Source§

impl<S: SamplesReader> ChannelsReader for AnyChannelsReader<S>