diff options
-rw-r--r-- | gifed/src/gif.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gifed/src/gif.rs b/gifed/src/gif.rs index f11694a..06cf0b8 100644 --- a/gifed/src/gif.rs +++ b/gifed/src/gif.rs @@ -50,6 +50,11 @@ impl Gif { self.descriptor.background_color_index = idx; } + pub fn set_palette(&mut self, palette: Option<Palette>) { + self.descriptor.set_color_table_metadata(palette.as_ref()); + self.palette = palette; + } + pub fn background_color(&self) -> Option<u8> { // vii) Background Color Index - Index into the Global Color Table for // the Background Color. The Background Color is the color used for |