jxl_render

Struct RenderContext

Source
pub struct RenderContext { /* private fields */ }
Expand description

Render context that tracks loaded and rendered frames.

Implementations§

Source§

impl RenderContext

Source§

impl RenderContext

Source§

impl RenderContext

Source

pub fn set_cms( &mut self, cms: impl ColorManagementSystem + Send + Sync + 'static, )

Source

pub fn suggested_hdr_tf(&self) -> Option<TransferFunction>

Source

pub fn request_color_encoding(&mut self, encoding: ColorEncodingWithProfile)

Source

pub fn requested_color_encoding(&self) -> &ColorEncodingWithProfile

Source

pub fn request_image_region(&mut self, image_region: Region)

Source

pub fn image_region(&self) -> Region

Source§

impl RenderContext

Source

pub fn width(&self) -> u32

Returns the image width.

Source

pub fn height(&self) -> u32

Returns the image height.

Source

pub fn embedded_icc(&self) -> Option<&[u8]>

Source

pub fn loaded_keyframes(&self) -> usize

Returns the number of loaded keyframes in the context.

Source

pub fn loaded_frames(&self) -> usize

Returns the number of loaded frames in the context, including frames that are not shown directly.

Source§

impl RenderContext

Source

pub fn load_frame_header( &mut self, bitstream: &mut Bitstream<'_>, ) -> Result<&mut IndexedFrame>

Source

pub fn current_loading_frame(&mut self) -> Option<&mut IndexedFrame>

Source

pub fn finalize_current_frame(&mut self)

Source§

impl RenderContext

Source

pub fn keyframe(&self, keyframe_idx: usize) -> Option<&IndexedFrame>

Returns the frame with the keyframe index, or None if the keyframe does not exist.

Source

pub fn frame(&self, frame_idx: usize) -> Option<&IndexedFrame>

Source§

impl RenderContext

Source

pub fn render(&mut self) -> Result<Arc<ImageWithRegion>>

Renders the first keyframe.

The keyframe should be loaded in prior to rendering, with one of the loading methods.

Source

pub fn render_keyframe( &self, keyframe_idx: usize, ) -> Result<Arc<ImageWithRegion>>

Renders the keyframe.

The keyframe should be loaded in prior to rendering, with one of the loading methods.

Source

pub fn render_loading_keyframe( &mut self, ) -> Result<(&IndexedFrame, Arc<ImageWithRegion>)>

Source

pub fn reset_cache(&mut self)

Trait Implementations§

Source§

impl Debug for RenderContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more