From 0ec3c8d1c51ea2286e7762f3a3d1cbebd7700f50 Mon Sep 17 00:00:00 2001 From: gennyble Date: Fri, 12 Jan 2024 12:08:19 -0600 Subject: squash: fix tolerance and add algorithm selection --- src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 8d94c8e..213adfc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -144,6 +144,13 @@ impl Squasher { } } + #[cfg(feature = "gifed")] + pub fn palette_gifed(&self) -> gifed::block::Palette { + use rgb::ComponentBytes; + + self.palette.as_slice().as_bytes().try_into().unwrap() + } + /// Retrieve the palette this squasher is working from pub fn palette(&self) -> &[RGB8] { &self.palette -- cgit 1.4.1-3-g733a5