about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgennyble <gen@nyble.dev>2022-12-10 17:26:19 -0600
committergennyble <gen@nyble.dev>2022-12-10 17:26:19 -0600
commitb8244907bae232420b0a7e358a970f5ff24d7433 (patch)
treecc59309180a92bbf0d05769c1e5aab43f533ce7d
parent9ef5ad4644f6a17934f940ce52ff38811daa1631 (diff)
downloadcolorsquash-b8244907bae232420b0a7e358a970f5ff24d7433.tar.gz
colorsquash-b8244907bae232420b0a7e358a970f5ff24d7433.zip
add comment about mapping every image
-rw-r--r--src/lib.rs2
1 files changed, 2 insertions, 0 deletions
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<T: Count> Squasher<T> {
     /// 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);