1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//!  Decoding of GIF Images
//!
//!  GIF (Graphics Interchange Format) is an image format that supports lossless compression.
//!
//!  # Related Links
//!  * http://www.w3.org/Graphics/GIF/spec-gif89a.txt - The GIF Specification
//!

pub use self::decoder::GIFDecoder;
pub use self::encoder::Encoder as GIFEncoder;
pub use self::encoder::ColorMode;

mod decoder;
mod encoder;


enum_from_primitive! {
/// Known block types
enum Block {
    Image = 0x2C,
    Extension = 0x21,
    Trailer = 0x3B
}
}

enum_from_primitive! {
/// Known GIF extensions
enum Extension {
    Text = 0x01,
    Control = 0xF9,
    Comment = 0xFE,
    Application = 0xFF
}
}

enum_from_primitive! {
/// Method to dispose the image
enum DisposalMethod {
	Undefined = 0,
	None = 1,
	Previous = 2,
	Background = 3
}
}