Type Alias png::decoder::transform::TransformFn

source ·
pub type TransformFn = Box<dyn Fn(&[u8], &mut [u8], &Info<'_>) + Send + Sync>;
Expand description

Type of a function that can transform a decompressed, unfiltered row (the 1st argument) into the final pixels (the 2nd argument), optionally using image metadata (e.g. PLTE data can be accessed using the 3rd argument).

TODO: If some precomputed state is needed (e.g. to make expand_paletted... faster) then consider changing this into Box<dyn Fn(...)>.

Aliased Type§

struct TransformFn(Unique<dyn Fn(&[u8], &mut [u8], &Info<'_>) + Sync + Send>, Global);

Fields§

§0: Unique<dyn Fn(&[u8], &mut [u8], &Info<'_>) + Sync + Send>§1: Global

Trait Implementations§

1.0.0 · source§

impl<T, A> Deref for Box<T, A>where A: Allocator, T: ?Sized,

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.