Struct jxl_oxide::FrameBuffer
source · pub struct FrameBuffer { /* private fields */ }
Expand description
Frame buffer representing a decoded image.
Implementations§
source§impl FrameBuffer
impl FrameBuffer
sourcepub fn new(width: usize, height: usize, channels: usize) -> Self
pub fn new(width: usize, height: usize, channels: usize) -> Self
Creates a new framebuffer with given dimension.
Note that framebuffer allocations are not tracked.
sourcepub fn buf(&self) -> &[f32]
pub fn buf(&self) -> &[f32]
Returns the contents of frame buffer.
The buffer has length of width * height * channels
, where n * channels + c
-th sample
belongs to the c
-th channel.
sourcepub fn buf_mut(&mut self) -> &mut [f32]
pub fn buf_mut(&mut self) -> &mut [f32]
Returns the mutable reference to frame buffer.
The buffer has length of width * height * channels
, where n * channels + c
-th sample
belongs to the c
-th channel.
sourcepub fn buf_grouped<const N: usize>(&self) -> &[[f32; N]]
pub fn buf_grouped<const N: usize>(&self) -> &[[f32; N]]
Trait Implementations§
source§impl Clone for FrameBuffer
impl Clone for FrameBuffer
source§fn clone(&self) -> FrameBuffer
fn clone(&self) -> FrameBuffer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for FrameBuffer
impl RefUnwindSafe for FrameBuffer
impl Send for FrameBuffer
impl Sync for FrameBuffer
impl Unpin for FrameBuffer
impl UnwindSafe for FrameBuffer
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