diff options
author | Genny <gen@nyble.dev> | 2023-02-09 19:38:57 -0600 |
---|---|---|
committer | Genny <gen@nyble.dev> | 2023-02-09 19:38:57 -0600 |
commit | c2833c9b4f942c3071478b7dbedef0c099734772 (patch) | |
tree | 2ce0c33a6b792e466b68439d29c6a31b86c899df /gifed/src | |
parent | 404b21ff31c9babb3b7472d29392334bb949943b (diff) | |
download | gifed-c2833c9b4f942c3071478b7dbedef0c099734772.tar.gz gifed-c2833c9b4f942c3071478b7dbedef0c099734772.zip |
dewarn, 0.2.0
Diffstat (limited to 'gifed/src')
-rw-r--r-- | gifed/src/block/mod.rs | 7 | ||||
-rw-r--r-- | gifed/src/block/packed.rs | 8 | ||||
-rw-r--r-- | gifed/src/color.rs | 9 | ||||
-rw-r--r-- | gifed/src/gif.rs | 3 | ||||
-rw-r--r-- | gifed/src/writer/gifbuilder.rs | 2 | ||||
-rw-r--r-- | gifed/src/writer/imagebuilder.rs | 3 |
6 files changed, 1 insertions, 31 deletions
diff --git a/gifed/src/block/mod.rs b/gifed/src/block/mod.rs index 3a0f09f..36cc6fe 100644 --- a/gifed/src/block/mod.rs +++ b/gifed/src/block/mod.rs @@ -13,8 +13,6 @@ pub use palette::Palette; pub use screendescriptor::ScreenDescriptor; pub use version::Version; -use crate::writer::ImageBuilder; - use self::extension::Application; use self::extension::GraphicControl; @@ -28,11 +26,6 @@ pub enum Block { LoopingExtension(LoopCount), } -enum WriteBlock { - ImageBuilder(ImageBuilder), - Block(Block), -} - pub enum LoopCount { Forever, Number(u16), diff --git a/gifed/src/block/packed.rs b/gifed/src/block/packed.rs index 59da8c9..00d4373 100644 --- a/gifed/src/block/packed.rs +++ b/gifed/src/block/packed.rs @@ -4,10 +4,6 @@ pub struct GraphicPacked { } impl GraphicPacked { - pub(crate) fn new(packed: u8) -> Self { - Self { raw: packed } - } - pub fn reserved(&self) -> u8 { self.raw & 0b111_000_0_0 >> 5 } @@ -59,10 +55,6 @@ pub struct ImagePacked { } impl ImagePacked { - pub(crate) fn new(packed: u8) -> Self { - Self { raw: packed } - } - pub fn color_table(&self) -> bool { self.raw & 0b1_0_0_00_000 > 0 } diff --git a/gifed/src/color.rs b/gifed/src/color.rs index 4b6e22a..e1b727a 100644 --- a/gifed/src/color.rs +++ b/gifed/src/color.rs @@ -42,12 +42,3 @@ impl Into<[u8; 3]> for Color { [self.r, self.g, self.b] } } - -pub type Rgb = Color; - -pub struct Rgba { - pub r: u8, - pub g: u8, - pub b: u8, - pub a: u8, -} diff --git a/gifed/src/gif.rs b/gifed/src/gif.rs index 563f37e..09b052e 100644 --- a/gifed/src/gif.rs +++ b/gifed/src/gif.rs @@ -4,8 +4,7 @@ use crate::{ block::{ encode_block, extension::{DisposalMethod, GraphicControl}, - packed::ImagePacked, - Block, CompressedImage, ImageDescriptor, IndexedImage, Palette, ScreenDescriptor, Version, + Block, CompressedImage, IndexedImage, Palette, ScreenDescriptor, Version, }, writer::GifBuilder, }; diff --git a/gifed/src/writer/gifbuilder.rs b/gifed/src/writer/gifbuilder.rs index 2aaf51f..3d2dc23 100644 --- a/gifed/src/writer/gifbuilder.rs +++ b/gifed/src/writer/gifbuilder.rs @@ -1,5 +1,3 @@ -use std::io::Write; - use crate::{ block::{ packed::ScreenPacked, Block, CompressedImage, IndexedImage, LoopCount, Palette, diff --git a/gifed/src/writer/imagebuilder.rs b/gifed/src/writer/imagebuilder.rs index 66d9fdb..2163477 100644 --- a/gifed/src/writer/imagebuilder.rs +++ b/gifed/src/writer/imagebuilder.rs @@ -17,8 +17,6 @@ pub struct ImageBuilder { delay: u16, disposal_method: DisposalMethod, transparent_index: Option<u8>, - - indicies: Vec<u8>, } impl ImageBuilder { @@ -32,7 +30,6 @@ impl ImageBuilder { delay: 0, disposal_method: DisposalMethod::NoAction, transparent_index: None, - indicies: vec![], } } |