diff options
author | gennyble <gen@nyble.dev> | 2024-01-12 12:08:19 -0600 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2024-01-12 12:08:19 -0600 |
commit | 0ec3c8d1c51ea2286e7762f3a3d1cbebd7700f50 (patch) | |
tree | b51a97b76457299c0647232893a99991a9d17a6d /src | |
parent | 093bb9d6889f6e026f14edc04e2f79bdea3c0b56 (diff) | |
download | colorsquash-0ec3c8d1c51ea2286e7762f3a3d1cbebd7700f50.tar.gz colorsquash-0ec3c8d1c51ea2286e7762f3a3d1cbebd7700f50.zip |
squash: fix tolerance and add algorithm selection
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<T: Count> Squasher<T> { } } + #[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 |