From b8244907bae232420b0a7e358a970f5ff24d7433 Mon Sep 17 00:00:00 2001 From: gennyble Date: Sat, 10 Dec 2022 17:26:19 -0600 Subject: add comment about mapping every image --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 8efd6ad..43aec69 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,6 +31,8 @@ impl Squasher { /// Take an RGB image buffer and an output buffer. The function will fill /// the output buffer with indexes into the Palette. pub fn map_image(&mut self, image: &[u8], buffer: &mut [T]) { + // We have to map the colours of this image now because it might contain + // colours not present in the first image. let sorted = Self::unique_and_sort(image); self.map_selected(&sorted); -- cgit 1.4.1-3-g733a5