pub struct FujiCompressed<'a> {
pub header: FujiHeader,
/* private fields */
}Expand description
A parsed compressed payload, ready to decode.
Fields§
§header: FujiHeaderImplementations§
Source§impl<'a> FujiCompressed<'a>
impl<'a> FujiCompressed<'a>
Sourcepub fn block_ranges(&self, base: &'a [u8]) -> Vec<(usize, usize)>
pub fn block_ranges(&self, base: &'a [u8]) -> Vec<(usize, usize)>
Byte ranges (relative to the header start) of each block’s entropy data.
Sourcepub fn decode(
&self,
out: &mut [u16],
width: u32,
height: u32,
colors: &ColorTile,
parallel: bool,
) -> Result<()>
pub fn decode( &self, out: &mut [u16], width: u32, height: u32, colors: &ColorTile, parallel: bool, ) -> Result<()>
Decode into out, a row-major width × height buffer that must match the
stream’s image size. Stripes decode in parallel when parallel.
Sourcepub fn decode_region(
&self,
out: &mut [u16],
region: Rect,
colors: &ColorTile,
parallel: bool,
) -> Result<()>
pub fn decode_region( &self, out: &mut [u16], region: Rect, colors: &ColorTile, parallel: bool, ) -> Result<()>
Decode only region (image coordinates) into out (region.width × region.height).
Only the stripes intersecting the region are decoded, and each stops after the
last 6-row line the region needs.
Auto Trait Implementations§
impl<'a> Forget for FujiCompressed<'a>
impl<'a> Freeze for FujiCompressed<'a>
impl<'a> RefUnwindSafe for FujiCompressed<'a>
impl<'a> Send for FujiCompressed<'a>
impl<'a> Sync for FujiCompressed<'a>
impl<'a> Unpin for FujiCompressed<'a>
impl<'a> UnsafeUnpin for FujiCompressed<'a>
impl<'a> UnwindSafe for FujiCompressed<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more