pub struct ImageWithAttributesReader<L> {
image_attributes: ImageAttributes,
layers_reader: L,
}
Expand description
Processes blocks from a file and collects them into a complete Image
.
Fields§
§image_attributes: ImageAttributes
§layers_reader: L
Implementations§
source§impl<L> ImageWithAttributesReader<L>where
L: LayersReader,
impl<L> ImageWithAttributesReader<L>where
L: LayersReader,
sourcepub fn new(headers: &[Header], layers_reader: L) -> Result<Self>
pub fn new(headers: &[Header], layers_reader: L) -> Result<Self>
A new image reader with image attributes.
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 image
sourcefn into_image(self) -> Image<L::Layers>
fn into_image(self) -> Image<L::Layers>
Deliver the complete accumulated image
Trait Implementations§
source§impl<L: Clone> Clone for ImageWithAttributesReader<L>
impl<L: Clone> Clone for ImageWithAttributesReader<L>
source§fn clone(&self) -> ImageWithAttributesReader<L>
fn clone(&self) -> ImageWithAttributesReader<L>
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<L: Debug> Debug for ImageWithAttributesReader<L>
impl<L: Debug> Debug for ImageWithAttributesReader<L>
source§impl<L: PartialEq> PartialEq for ImageWithAttributesReader<L>
impl<L: PartialEq> PartialEq for ImageWithAttributesReader<L>
source§fn eq(&self, other: &ImageWithAttributesReader<L>) -> bool
fn eq(&self, other: &ImageWithAttributesReader<L>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<L> StructuralPartialEq for ImageWithAttributesReader<L>
Auto Trait Implementations§
impl<L> Freeze for ImageWithAttributesReader<L>where
L: Freeze,
impl<L> RefUnwindSafe for ImageWithAttributesReader<L>where
L: RefUnwindSafe,
impl<L> Send for ImageWithAttributesReader<L>where
L: Send,
impl<L> Sync for ImageWithAttributesReader<L>where
L: Sync,
impl<L> Unpin for ImageWithAttributesReader<L>where
L: Unpin,
impl<L> UnwindSafe for ImageWithAttributesReader<L>where
L: 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