add palette name and colour count for GIMP palette

This commit is contained in:
Max Bradbury 2021-11-14 18:04:46 +00:00
parent c1be226956
commit 955645415d
1 changed files with 5 additions and 2 deletions

View File

@ -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