about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorgennyble <gen@nyble.dev>2024-01-12 12:08:19 -0600
committergennyble <gen@nyble.dev>2024-01-12 12:08:19 -0600
commit0ec3c8d1c51ea2286e7762f3a3d1cbebd7700f50 (patch)
treeb51a97b76457299c0647232893a99991a9d17a6d /src
parent093bb9d6889f6e026f14edc04e2f79bdea3c0b56 (diff)
downloadcolorsquash-0ec3c8d1c51ea2286e7762f3a3d1cbebd7700f50.tar.gz
colorsquash-0ec3c8d1c51ea2286e7762f3a3d1cbebd7700f50.zip
squash: fix tolerance and add algorithm selection
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs7
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