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: Sample>(&self) -> Option<Result<LfGlobal<S>>>
pub fn try_parse_lf_group<S: Sample>( &self, lf_global_vardct: Option<&LfGlobalVarDct>, global_ma_config: Option<&MaConfig>, mlf_group: Option<TransformedModularSubimage<'_, S>>, lf_group_idx: u32 ) -> Option<Result<LfGroup<S>>>
pub fn try_parse_hf_global<S: Sample>( &self, cached_lf_global: Option<&LfGlobal<S>> ) -> Option<Result<HfGlobal>>
pub fn pass_group_bitstream( &self, pass_idx: u32, group_idx: u32 ) -> Option<Result<PassGroupBitstream<'_>>>
source§impl Frame
impl Frame
sourcepub fn adjust_region(
&self,
(left, top, width, height): &mut (u32, u32, u32, u32)
)
pub fn adjust_region( &self, (left, top, width, height): &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 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