From 45be9439fe9296e44d37551b6f2e1edf46c6faee Mon Sep 17 00:00:00 2001 From: Genny Date: Thu, 9 Feb 2023 19:25:29 -0600 Subject: add width/height functions to reader; close #10 --- gifed/src/reader/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gifed/src/reader/mod.rs b/gifed/src/reader/mod.rs index d81961c..b1bcc32 100644 --- a/gifed/src/reader/mod.rs +++ b/gifed/src/reader/mod.rs @@ -109,6 +109,14 @@ pub struct Reader { } impl Reader { + pub fn width(&self) -> u16 { + self.screen_descriptor.width + } + + pub fn height(&self) -> u16 { + self.screen_descriptor.height + } + pub fn block(&mut self) -> Result, DecodeError> { if self.saw_trailer { return Ok(None); -- cgit 1.4.1-3-g733a5