pub struct ResizeWorkspace { /* private fields */ }Expand description
Reusable RGBA resize buffers and processor for sequential animation frames.
The workspace owns its destination buffer. Self::pixels remains valid
until the next successful resize or until the workspace is dropped.
Implementations§
Source§impl ResizeWorkspace
impl ResizeWorkspace
Sourcepub fn transform_rgba(
&mut self,
source_rgba: &mut [u8],
) -> Result<(), ResizeError>
pub fn transform_rgba( &mut self, source_rgba: &mut [u8], ) -> Result<(), ResizeError>
Resizes a full-canvas RGBA source into this workspace’s reusable destination buffer.
fast_image_resize::images::Image::from_slice_u8 requires a mutable
buffer for every image view, including the source view. This method uses
that contract, but directs its output to the workspace destination rather
than modifying source_rgba. The destination allocation and resizer are
retained for the next frame.
Sourcepub fn pixels(&self) -> &[u8] ⓘ
pub fn pixels(&self) -> &[u8] ⓘ
Returns the destination pixels from the most recent successful resize.
The next successful Self::transform_rgba call overwrites this buffer.
Auto Trait Implementations§
impl Freeze for ResizeWorkspace
impl RefUnwindSafe for ResizeWorkspace
impl Send for ResizeWorkspace
impl Sync for ResizeWorkspace
impl Unpin for ResizeWorkspace
impl UnsafeUnpin for ResizeWorkspace
impl UnwindSafe for ResizeWorkspace
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