pub trait LayersReader {
type Layers;
// Required methods
fn filter_block(
&self,
meta: &MetaData,
tile: TileCoordinates,
block: BlockIndex,
) -> bool;
fn read_block(
&mut self,
headers: &[Header],
block: UncompressedBlock,
) -> UnitResult;
fn into_layers(self) -> Self::Layers;
}
Expand description
Processes pixel blocks from a file and accumulates them into a single image layer.
Required Associated Types§
Required Methods§
sourcefn filter_block(
&self,
meta: &MetaData,
tile: TileCoordinates,
block: BlockIndex,
) -> bool
fn filter_block( &self, meta: &MetaData, tile: TileCoordinates, block: BlockIndex, ) -> bool
Specify whether a single block of pixels should be loaded from the file
sourcefn read_block(
&mut self,
headers: &[Header],
block: UncompressedBlock,
) -> UnitResult
fn read_block( &mut self, headers: &[Header], block: UncompressedBlock, ) -> UnitResult
Load a single pixel block, which has not been filtered, into the reader, accumulating the layer
sourcefn into_layers(self) -> Self::Layers
fn into_layers(self) -> Self::Layers
Deliver the final accumulated layers for the image