pub struct DumpImage { /* private fields */ }Expand description
Header/decode driver for the codestream index/info and the dump text
(the jpeg2k DumpImage equivalent).
Implementations§
Source§impl DumpImage
impl DumpImage
Sourcepub fn new(codec: Decoder, stream: Stream) -> DumpImage
pub fn new(codec: Decoder, stream: Stream) -> DumpImage
Wrap an existing decoder and stream for index/info/dump access (the
decoder’s header must already have been read). Composes the dump
facility with the low-level Decoder API.
Sourcepub fn from_bytes(buf: &[u8]) -> Result<DumpImage, Error>
pub fn from_bytes(buf: &[u8]) -> Result<DumpImage, Error>
Wraps the given codestream bytes with default parameters.
Sourcepub fn from_bytes_with(
buf: &[u8],
params: DecodeParameters,
) -> Result<DumpImage, Error>
pub fn from_bytes_with( buf: &[u8], params: DecodeParameters, ) -> Result<DumpImage, Error>
Wraps the given codestream bytes with explicit decode parameters.
Sourcepub fn from_file<P>(path: P) -> Result<DumpImage, Error>
pub fn from_file<P>(path: P) -> Result<DumpImage, Error>
Wraps a codestream file with default parameters.
Sourcepub fn from_file_with<P>(
path: P,
params: DecodeParameters,
) -> Result<DumpImage, Error>
pub fn from_file_with<P>( path: P, params: DecodeParameters, ) -> Result<DumpImage, Error>
Wraps a codestream file with explicit decode parameters.
Sourcepub fn decode(&mut self) -> Result<(), Error>
pub fn decode(&mut self) -> Result<(), Error>
Decode the tile data (needed to populate the codestream index with the tile markers).
Sourcepub fn get_codestream_index(&self) -> Option<CodestreamIndex>
pub fn get_codestream_index(&self) -> Option<CodestreamIndex>
The codestream index (tile-parts, markers, packets).
Sourcepub fn get_codestream_info(&self) -> Option<CstrInfoV2>
pub fn get_codestream_info(&self) -> Option<CstrInfoV2>
The codestream header info (v2).
Auto Trait Implementations§
impl !Freeze for DumpImage
impl !RefUnwindSafe for DumpImage
impl !Send for DumpImage
impl !Sync for DumpImage
impl !UnwindSafe for DumpImage
impl Forget for DumpImage
impl Move for DumpImage
impl Unpin for DumpImage
impl UnsafeUnpin for DumpImage
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