diff options
author | Genny <gen@nyble.dev> | 2021-03-10 01:26:24 -0600 |
---|---|---|
committer | Genny <gen@nyble.dev> | 2021-03-10 01:26:24 -0600 |
commit | 743888ae0c1038a92f4a0b64709a313eba70c887 (patch) | |
tree | 3b1f6e9fbe2524d3177a4ed12e3486a4fb009460 /src/writer/imagebuilder.rs | |
parent | a368be4dfb3c1f75f6bcfdc297fe0372fb5f6092 (diff) | |
download | gifed-743888ae0c1038a92f4a0b64709a313eba70c887.tar.gz gifed-743888ae0c1038a92f4a0b64709a313eba70c887.zip |
Refactor code and get ready for extension blocks
Diffstat (limited to 'src/writer/imagebuilder.rs')
-rw-r--r-- | src/writer/imagebuilder.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/writer/imagebuilder.rs b/src/writer/imagebuilder.rs index d8b9900..f2156ac 100644 --- a/src/writer/imagebuilder.rs +++ b/src/writer/imagebuilder.rs @@ -1,4 +1,4 @@ -use crate::block::{ColorTable, Image, ImageDescriptor}; +use crate::block::{ColorTable, IndexedImage, ImageDescriptor}; pub struct ImageBuilder { left_offset: u16, @@ -48,7 +48,7 @@ impl ImageBuilder { self } - pub fn build(self) -> Image { + pub fn build(self) -> IndexedImage { let mut imgdesc = ImageDescriptor { left: self.left_offset, top: self.top_offset, @@ -62,7 +62,7 @@ impl ImageBuilder { imgdesc.color_table_size(lct.packed_len()); } - Image { + IndexedImage { image_descriptor: imgdesc, local_color_table: self.color_table, indicies: self.indicies |