diff options
author | Genny <gen@nyble.dev> | 2023-02-09 19:25:29 -0600 |
---|---|---|
committer | Genny <gen@nyble.dev> | 2023-02-09 19:25:29 -0600 |
commit | 45be9439fe9296e44d37551b6f2e1edf46c6faee (patch) | |
tree | d0d6d842925efe2dfdba1e1b7044aa32ab64f778 | |
parent | 4cf9e9987284d2806592dbdbdd1df5095c990d12 (diff) | |
download | gifed-45be9439fe9296e44d37551b6f2e1edf46c6faee.tar.gz gifed-45be9439fe9296e44d37551b6f2e1edf46c6faee.zip |
add width/height functions to reader; close #10
-rw-r--r-- | gifed/src/reader/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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<R: Read> { } impl<R: Read> Reader<R> { + pub fn width(&self) -> u16 { + self.screen_descriptor.width + } + + pub fn height(&self) -> u16 { + self.screen_descriptor.height + } + pub fn block(&mut self) -> Result<Option<ReadBlock>, DecodeError> { if self.saw_trailer { return Ok(None); |