From 955645415dcbefa2885695bdd3f51345282a711f Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Sun, 14 Nov 2021 18:04:46 +0000 Subject: [PATCH] add palette name and colour count for GIMP palette --- src/palette.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/palette.rs b/src/palette.rs index 37704f5..c7fe886 100644 --- a/src/palette.rs +++ b/src/palette.rs @@ -101,8 +101,11 @@ impl Palette { ) }).collect(); - // todo re-insert original comments - format!("GIMP Palette\r\n{}\r\n", colours.join("\r\n")) + // todo fix palette description? does it matter? + format!( + "GIMP Palette\r\n#Palette Name: {}\r\n#Colors: {}\r\n{}\r\n", + self.name, colours.len(), colours.join("\r\n") + ) } /// Paint.net .txt format