pub struct EncodeOptions {
pub color: ColorMode,
pub compression: u8,
pub filter: Filter,
pub interlace: bool,
}Expand description
PNG encode tuning. Mirrors the knobs spng exposes via spng_set_option
that the libdeflate backend can honor:
compression↔SPNG_IMG_COMPRESSION_LEVEL,filter↔SPNG_IMG_FILTER_CHOICE(viaFilter::Choice).
spng’s SPNG_IMG_WINDOW_BITS, SPNG_IMG_MEM_LEVEL, and
SPNG_IMG_COMPRESSION_STRATEGY have no libdeflate equivalent —
libdeflate always uses a full 32 KiB window and chooses its own internal
memory/strategy per level — so they are intentionally not exposed rather
than silently accepted and ignored.
Fields§
§color: ColorMode§compression: u80 = uncompressed stored blocks, 1..=12 = libdeflate level.
filter: Filter§interlace: boolTrait Implementations§
Source§impl Clone for EncodeOptions
impl Clone for EncodeOptions
Source§impl Debug for EncodeOptions
impl Debug for EncodeOptions
Auto Trait Implementations§
impl Freeze for EncodeOptions
impl RefUnwindSafe for EncodeOptions
impl Send for EncodeOptions
impl Sync for EncodeOptions
impl Unpin for EncodeOptions
impl UnsafeUnpin for EncodeOptions
impl UnwindSafe for EncodeOptions
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