diff servlet/src/digilib/io/ImageFile.java @ 170:d40922628e4a

Servlet Version 1.16b2 with new DigilibParameter code. - more generic class for request parameters - like already done for DiglibConfig - changes in JSPs for new request stuff - changes in ImageSize class so size=0 is "wildcard" - missing dw and dh parameters now treated as wildcards - changed package name in imageinfo class
author robcast
date Wed, 29 Oct 2003 22:47:15 +0100
parents e743b853efca
children c633e97cac12
line wrap: on
line diff
--- a/servlet/src/digilib/io/ImageFile.java	Wed Oct 29 22:45:51 2003 +0100
+++ b/servlet/src/digilib/io/ImageFile.java	Wed Oct 29 22:47:15 2003 +0100
@@ -124,5 +124,13 @@
 	public boolean isChecked() {
 		return (pixelSize != null);
 	}
+	
+	/** Returns the aspect ratio of the image (width/height).
+	 * 
+	 * @return
+	 */
+	public double getAspect() {
+		return (pixelSize != null) ? pixelSize.getAspect() : 0;
+	}
 
 }