about summary refs log tree commit diff
path: root/src/block/indexedimage.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/block/indexedimage.rs')
-rw-r--r--src/block/indexedimage.rs18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/block/indexedimage.rs b/src/block/indexedimage.rs
index 52be3d5..0be066f 100644
--- a/src/block/indexedimage.rs
+++ b/src/block/indexedimage.rs
@@ -10,6 +10,22 @@ pub struct IndexedImage {
 }
 
 impl IndexedImage {
+    pub fn left(&self) -> u16 {
+        self.image_descriptor.left
+    }
+
+    pub fn top(&self) -> u16 {
+        self.image_descriptor.left
+    }
+
+    pub fn width(&self) -> u16 {
+        self.image_descriptor.width
+    }
+
+    pub fn height(&self) -> u16 {
+        self.image_descriptor.height
+    }
+
     pub fn as_boxed_slice(&self, minimum_code_size: u8) -> Box<[u8]> {
         let mut out = vec![];
 
@@ -46,7 +62,7 @@ impl IndexedImage {
     }
 }
 
-pub struct BlockedImage {
+pub struct CompressedImage {
     pub image_descriptor: ImageDescriptor,
     pub local_color_table: Option<ColorTable>,
     pub lzw_minimum_code_size: u8,