diff options
author | Genny <gen@nyble.dev> | 2021-03-10 02:44:45 -0600 |
---|---|---|
committer | Genny <gen@nyble.dev> | 2021-03-10 02:44:45 -0600 |
commit | fa403b904c8596d8d1731d7f8bfafa6c0145e3dd (patch) | |
tree | b1c0b89da9f51f35b7984a30d9c249788922bb9a /src/writer/gifbuilder.rs | |
parent | 743888ae0c1038a92f4a0b64709a313eba70c887 (diff) | |
download | gifed-fa403b904c8596d8d1731d7f8bfafa6c0145e3dd.tar.gz gifed-fa403b904c8596d8d1731d7f8bfafa6c0145e3dd.zip |
Implement, roughly, extensions, animation, and looping
Diffstat (limited to 'src/writer/gifbuilder.rs')
-rw-r--r-- | src/writer/gifbuilder.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/writer/gifbuilder.rs b/src/writer/gifbuilder.rs index 2cdc52c..7e5138a 100644 --- a/src/writer/gifbuilder.rs +++ b/src/writer/gifbuilder.rs @@ -1,4 +1,4 @@ -use crate::block::{Block, ColorTable, ScreenDescriptor, Version}; +use crate::block::{Block, ColorTable, ScreenDescriptor, Version, extension::Extension}; use crate::writer::ImageBuilder; use crate::Gif; @@ -44,6 +44,11 @@ impl GifBuilder { self } + pub fn extension(mut self, ext: Extension) -> Self { + self.blocks.push(Block::Extension(ext)); + self + } + pub fn build(self) -> Gif { let mut lsd = ScreenDescriptor { width: self.width, |