diff servlet/src/digilib/image/DocuImageImpl.java @ 573:beeedf90cb81 stream

Merge from HEAD fd2ef7e461198ef4a9d9a02459be2057038d600d
author robcast
date Wed, 22 Dec 2010 09:54:34 +0100
parents 50f291d808b1 fd2ef7e46119
children aee436f0549d
line wrap: on
line diff
--- a/servlet/src/digilib/image/DocuImageImpl.java	Tue Dec 21 12:16:33 2010 +0100
+++ b/servlet/src/digilib/image/DocuImageImpl.java	Wed Dec 22 09:54:34 2010 +0100
@@ -28,6 +28,8 @@
 import java.util.LinkedList;
 import java.util.List;
 
+import javax.servlet.ServletException;
+
 import org.apache.log4j.Logger;
 
 import digilib.io.FileOpException;
@@ -56,6 +58,9 @@
 	/** image mime-type */
 	protected String mimeType = null;
 
+	/** image size */
+    protected ImageSize imgSize = null;
+
 	/**
 	 * Returns the quality.
 	 * @return int
@@ -154,15 +159,25 @@
     }
 
     public int getHeight() {
-        // TODO Auto-generated method stub
+        ImageSize is = getSize();
+        if (is != null) {
+            return is.getHeight();
+        }
         return 0;
     }
 
     public int getWidth() {
-        // TODO Auto-generated method stub
+        ImageSize is = getSize();
+        if (is != null) {
+            return is.getWidth();
+        }
         return 0;
     }
 
+    public ImageSize getSize() {
+        return imgSize;
+    }
+
     public void loadImage(ImageFile f) throws FileOpException {
         // TODO Auto-generated method stub
         
@@ -174,7 +189,7 @@
     }
 
     public void writeImage(String mt, OutputStream ostream)
-            throws FileOpException {
+            throws ServletException, ImageOpException {
         // TODO Auto-generated method stub
     }