about summary refs log tree commit diff
path: root/src/reader
diff options
context:
space:
mode:
authorGenny <gen@nyble.dev>2021-10-11 03:35:38 -0500
committerGenny <gen@nyble.dev>2021-10-11 03:35:38 -0500
commit9b7bd5696a21496fa0c38a17e69c5c0658acfe73 (patch)
treeb18b5016968892b7c85a9a80f42d320a9b52ab69 /src/reader
parent4cbbd1e9476722c266eaa746f620da5a01523bc0 (diff)
downloadgifed-9b7bd5696a21496fa0c38a17e69c5c0658acfe73.tar.gz
gifed-9b7bd5696a21496fa0c38a17e69c5c0658acfe73.zip
Implement images iterator
Diffstat (limited to 'src/reader')
-rw-r--r--src/reader/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/reader/mod.rs b/src/reader/mod.rs
index 958eff2..1b52874 100644
--- a/src/reader/mod.rs
+++ b/src/reader/mod.rs
@@ -181,6 +181,7 @@ pub enum DecodingError {
     IoError(std::io::Error),
     UnknownVersionString,
     UnexpectedEof,
+    ColorIndexOutOfBounds,
 }
 
 impl Error for DecodingError {}
@@ -194,6 +195,12 @@ impl fmt::Display for DecodingError {
             DecodingError::UnexpectedEof => {
                 write!(f, "Found the end of the data at a weird spot")
             }
+            DecodingError::ColorIndexOutOfBounds => {
+                write!(
+                    f,
+                    "The image contained an index not found in the color table"
+                )
+            }
         }
     }
 }