pub struct DecompressStarted<R> { /* private fields */ }Expand description
See methods on Decompress
Implementations§
Source§impl<R> DecompressStarted<R>
impl<R> DecompressStarted<R>
pub fn color_space(&self) -> ColorSpace
Sourcepub fn min_flat_buffer_size(&self) -> usize
pub fn min_flat_buffer_size(&self) -> usize
Gets the minimal buffer size for using DecompressStarted::read_scanlines_flat_into
Sourcepub fn read_raw_data(&mut self, image_dest: &mut [&mut Vec<JSAMPLE>])
pub fn read_raw_data(&mut self, image_dest: &mut [&mut Vec<JSAMPLE>])
Append data
pub fn width(&self) -> usize
pub fn height(&self) -> usize
Sourcepub fn read_scanlines<T: Pod>(&mut self) -> Result<Vec<T>>
pub fn read_scanlines<T: Pod>(&mut self) -> Result<Vec<T>>
Supports any pixel type that is marked as “plain old data”, see bytemuck crate.
Pixels can either have number of bytes matching number of channels, e.g. RGB as
[u8; 3] or rgb::RGB8, or be an amorphous blob of u8s.
Sourcepub fn read_scanlines_into<'dest, T: Pod>(
&mut self,
dest: &'dest mut [T],
) -> Result<&'dest mut [T]>
pub fn read_scanlines_into<'dest, T: Pod>( &mut self, dest: &'dest mut [T], ) -> Result<&'dest mut [T]>
Supports any pixel type that is marked as “plain old data”, see bytemuck crate.
[u8; 3] and rgb::RGB8 are fine, for example. [u8] is allowed for any pixel type.
Allocation-less version of read_scanlines
Sourcepub fn read_scanlines_into_uninit<'dest, T: Pod>(
&mut self,
dest: &'dest mut [MaybeUninit<T>],
) -> Result<&'dest mut [T]>
pub fn read_scanlines_into_uninit<'dest, T: Pod>( &mut self, dest: &'dest mut [MaybeUninit<T>], ) -> Result<&'dest mut [T]>
Returns written-to slice
pub fn components(&self) -> &[CompInfo]
Sourcepub fn finish_into_inner(self) -> Result<R>where
R: BufRead,
pub fn finish_into_inner(self) -> Result<R>where
R: BufRead,
Finish decompress and return the reader
pub fn finish(self) -> Result<()>
Auto Trait Implementations§
impl<R> Freeze for DecompressStarted<R>
impl<R> RefUnwindSafe for DecompressStarted<R>where
R: RefUnwindSafe,
impl<R> !Send for DecompressStarted<R>
impl<R> !Sync for DecompressStarted<R>
impl<R> Unpin for DecompressStarted<R>
impl<R> UnsafeUnpin for DecompressStarted<R>
impl<R> UnwindSafe for DecompressStarted<R>where
R: 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