From fa403b904c8596d8d1731d7f8bfafa6c0145e3dd Mon Sep 17 00:00:00 2001 From: Genny Date: Wed, 10 Mar 2021 02:44:45 -0600 Subject: Implement, roughly, extensions, animation, and looping --- src/writer/gifbuilder.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/writer/gifbuilder.rs') 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, -- cgit 1.4.1-3-g733a5