diff options
author | gennyble <gen@nyble.dev> | 2022-12-10 17:26:19 -0600 |
---|---|---|
committer | gennyble <gen@nyble.dev> | 2022-12-10 17:26:19 -0600 |
commit | b8244907bae232420b0a7e358a970f5ff24d7433 (patch) | |
tree | cc59309180a92bbf0d05769c1e5aab43f533ce7d /src/lib.rs | |
parent | 9ef5ad4644f6a17934f940ce52ff38811daa1631 (diff) | |
download | colorsquash-b8244907bae232420b0a7e358a970f5ff24d7433.tar.gz colorsquash-b8244907bae232420b0a7e358a970f5ff24d7433.zip |
add comment about mapping every image
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 2 |
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); |