diff options
-rw-r--r-- | gifed/Cargo.toml | 4 | ||||
-rw-r--r-- | gifed/examples/streaming_write.rs | 2 | ||||
-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 |
8 files changed, 4 insertions, 34 deletions
diff --git a/gifed/Cargo.toml b/gifed/Cargo.toml index 7c92cd3..dec912f 100644 --- a/gifed/Cargo.toml +++ b/gifed/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "gifed" -version = "0.1.0" -authors = ["Genevive <gen@nyble.dev>"] +version = "0.2.0" +authors = ["Genevieve <gen@nyble.dev>"] edition = "2018" license = "CC0-1.0" description = "Gif encoding and decoding with fine control" diff --git a/gifed/examples/streaming_write.rs b/gifed/examples/streaming_write.rs index 7fab196..c86f933 100644 --- a/gifed/examples/streaming_write.rs +++ b/gifed/examples/streaming_write.rs @@ -3,7 +3,7 @@ use std::fs::File; use gifed::{ block::{LoopCount, Palette}, writer::{ImageBuilder, Writer}, - Color, EncodeError, Gif, + Color, EncodeError, }; fn main() -> Result<(), EncodeError> { 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![], } } |