From 9b7bd5696a21496fa0c38a17e69c5c0658acfe73 Mon Sep 17 00:00:00 2001 From: Genny Date: Mon, 11 Oct 2021 03:35:38 -0500 Subject: Implement images iterator --- src/reader/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/reader') 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" + ) + } } } } -- cgit 1.4.1-3-g733a5