pub trait SamplesReader {
    type Samples;

    // Required methods
    fn filter_block(&self, tile: TileCoordinates) -> bool;
    fn read_line(&mut self, line: LineRef<'_>) -> UnitResult;
    fn into_samples(self) -> Self::Samples;
}
Expand description

Processes pixel blocks from a file and accumulates them into a single pixel channel. For example, stores thousands of “Red” pixel values for a single layer.

Required Associated Types§

source

type Samples

The type of resulting sample storage

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_line(&mut self, line: LineRef<'_>) -> UnitResult

Load a single pixel line, which has not been filtered, into the reader, accumulating the sample data

source

fn into_samples(self) -> Self::Samples

Deliver the final accumulated sample storage for the image

Implementors§