pub struct Frame { /* private fields */ }
Expand description
JPEG XL frame.
A frame represents a single unit of image that can be displayed or referenced by other frames.
Implementations§
source§impl Frame
impl Frame
pub fn alloc_tracker(&self) -> Option<&AllocTracker>
pub fn image_header(&self) -> &ImageHeader
pub fn clone_image_header(&self) -> Arc<ImageHeader>
sourcepub fn header(&self) -> &FrameHeader
pub fn header(&self) -> &FrameHeader
Returns the frame header.
pub fn pass_shifts(&self) -> &BTreeMap<u32, (i32, i32)>
pub fn data(&self, group: TocGroupKind) -> Option<&[u8]>
source§impl Frame
impl Frame
pub fn feed_bytes<'buf>(&mut self, buf: &'buf [u8]) -> &'buf [u8] ⓘ
pub fn is_loading_done(&self) -> bool
source§impl Frame
impl Frame
pub fn try_parse_lf_global<S>(&self) -> Option<Result<LfGlobal<S>, Error>>where
S: Sample,
pub fn try_parse_lf_group<S>(
&self,
lf_global_vardct: Option<&LfGlobalVarDct>,
global_ma_config: Option<&MaConfig>,
mlf_group: Option<TransformedModularSubimage<'_, S>>,
lf_group_idx: u32,
) -> Option<Result<LfGroup<S>, Error>>where
S: Sample,
pub fn try_parse_hf_global<S>(
&self,
cached_lf_global: Option<&LfGlobal<S>>,
) -> Option<Result<HfGlobal, Error>>where
S: Sample,
pub fn pass_group_bitstream( &self, pass_idx: u32, group_idx: u32, ) -> Option<Result<PassGroupBitstream<'_>, Error>>
source§impl Frame
impl Frame
sourcepub fn adjust_region(&self, _: &mut (u32, u32, u32, u32))
pub fn adjust_region(&self, _: &mut (u32, u32, u32, u32))
Adjusts the cropping region of the image to the actual decoding region of the frame.
The cropping region of the image needs to be adjusted to be used in a frame, for a few reasons:
- A frame may be blended to the canvas with offset, which makes the image and the frame have different coordinates.
- Some filters reference other samples, which requires padding to the region.
This method takes care of those and adjusts the given region appropriately.
Trait Implementations§
source§impl Bundle<FrameContext<'_>> for Frame
impl Bundle<FrameContext<'_>> for Frame
Auto Trait Implementations§
impl !Freeze for Frame
impl !RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl !UnwindSafe for Frame
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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