about summary refs log tree commit diff
path: root/src/writer
diff options
context:
space:
mode:
authorGenny <gen@nyble.dev>2021-03-10 02:44:45 -0600
committerGenny <gen@nyble.dev>2021-03-10 02:44:45 -0600
commitfa403b904c8596d8d1731d7f8bfafa6c0145e3dd (patch)
treeb1c0b89da9f51f35b7984a30d9c249788922bb9a /src/writer
parent743888ae0c1038a92f4a0b64709a313eba70c887 (diff)
downloadgifed-fa403b904c8596d8d1731d7f8bfafa6c0145e3dd.tar.gz
gifed-fa403b904c8596d8d1731d7f8bfafa6c0145e3dd.zip
Implement, roughly, extensions, animation, and looping
Diffstat (limited to 'src/writer')
-rw-r--r--src/writer/gifbuilder.rs7
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,