Struct exr::block::UncompressedBlock
source · pub struct UncompressedBlock {
pub index: BlockIndex,
pub data: ByteVec,
}
Expand description
Contains a block of pixel data and where that data should be placed in the actual image.
Fields§
§index: BlockIndex
Location of the data inside the image.
data: ByteVec
Uncompressed pixel values of the whole block. One or more scan lines may be stored together as a scan line block. This byte vector contains all pixel rows, one after another. For each line in the tile, for each channel, the row values are contiguous. Stores all samples of the first channel, then all samples of the second channel, and so on.
Implementations§
source§impl UncompressedBlock
impl UncompressedBlock
sourcepub fn decompress_chunk(
chunk: Chunk,
meta_data: &MetaData,
pedantic: bool,
) -> Result<Self>
pub fn decompress_chunk( chunk: Chunk, meta_data: &MetaData, pedantic: bool, ) -> Result<Self>
Decompress the possibly compressed chunk and returns an UncompressedBlock
.
sourcepub fn compress_to_chunk(self, headers: &[Header]) -> Result<Chunk>
pub fn compress_to_chunk(self, headers: &[Header]) -> Result<Chunk>
Consume this block by compressing it, returning a Chunk
.
sourcepub fn lines(&self, channels: &ChannelList) -> impl Iterator<Item = LineRef<'_>>
pub fn lines(&self, channels: &ChannelList) -> impl Iterator<Item = LineRef<'_>>
Iterate all the lines in this block. Each line contains the all samples for one of the channels.
sourcepub fn collect_block_data_from_lines(
channels: &ChannelList,
block_index: BlockIndex,
extract_line: impl FnMut(LineRefMut<'_>),
) -> Vec<u8> ⓘ
pub fn collect_block_data_from_lines( channels: &ChannelList, block_index: BlockIndex, extract_line: impl FnMut(LineRefMut<'_>), ) -> Vec<u8> ⓘ
Create an uncompressed block byte vector by requesting one line of samples after another.
sourcepub fn from_lines(
channels: &ChannelList,
block_index: BlockIndex,
extract_line: impl FnMut(LineRefMut<'_>),
) -> Self
pub fn from_lines( channels: &ChannelList, block_index: BlockIndex, extract_line: impl FnMut(LineRefMut<'_>), ) -> Self
Create an uncompressed block by requesting one line of samples after another.
Trait Implementations§
source§impl Clone for UncompressedBlock
impl Clone for UncompressedBlock
source§fn clone(&self) -> UncompressedBlock
fn clone(&self) -> UncompressedBlock
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UncompressedBlock
impl Debug for UncompressedBlock
source§impl PartialEq for UncompressedBlock
impl PartialEq for UncompressedBlock
impl Eq for UncompressedBlock
impl StructuralPartialEq for UncompressedBlock
Auto Trait Implementations§
impl Freeze for UncompressedBlock
impl RefUnwindSafe for UncompressedBlock
impl Send for UncompressedBlock
impl Sync for UncompressedBlock
impl Unpin for UncompressedBlock
impl UnwindSafe for UncompressedBlock
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)