changeset 460:530b7b58a727

Servlet version 1.5.9h - experimental Flashpix support with JAIDocuImage
author robcast
date Wed, 08 Feb 2006 20:30:49 +0100
parents b3519a49ae51
children 96bd3656e4a6
files servlet/src/digilib/servlet/DigilibImageWorker.java servlet/src/digilib/servlet/Scaler.java
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/servlet/DigilibImageWorker.java	Wed Feb 08 20:30:49 2006 +0100
+++ b/servlet/src/digilib/servlet/DigilibImageWorker.java	Wed Feb 08 20:30:49 2006 +0100
@@ -21,6 +21,7 @@
 
 package digilib.servlet;
 
+import java.awt.Rectangle;
 import java.awt.geom.Rectangle2D;
 import java.io.IOException;
 
@@ -149,6 +150,7 @@
 		// set interpolation quality
 		docuImage.setQuality(scaleQual);
 
+        Rectangle loadRect = outerUserImgArea.getBounds();
 		// use subimage loading if possible
 		if (docuImage.isSubimageSupported()) {
 			logger.debug("Subimage: scale " + scaleXY + " = " + (1 / scaleXY));
@@ -169,7 +171,7 @@
 						+ scaleXY);
 			}
 
-			docuImage.loadSubimage(fileToLoad, outerUserImgArea.getBounds(),
+			docuImage.loadSubimage(fileToLoad, loadRect,
 					(int) subsamp);
 
 			logger.debug("SUBSAMP: " + subsamp + " -> " + docuImage.getWidth()
@@ -180,8 +182,8 @@
 		} else {
 			// else load and crop the whole file
 			docuImage.loadImage(fileToLoad);
-			docuImage.crop((int) areaXoff, (int) areaYoff, (int) areaWidth,
-					(int) areaHeight);
+			docuImage.crop((int) loadRect.getX(), (int) loadRect.getY(), (int) loadRect.getWidth(),
+					(int) loadRect.getHeight());
 
 			docuImage.scale(scaleXY, scaleXY);
 		}
--- a/servlet/src/digilib/servlet/Scaler.java	Wed Feb 08 20:30:49 2006 +0100
+++ b/servlet/src/digilib/servlet/Scaler.java	Wed Feb 08 20:30:49 2006 +0100
@@ -59,7 +59,7 @@
 	private static final long serialVersionUID = -325080527268912852L;
 
 	/** digilib servlet version (for all components) */
-	public static final String dlVersion = "1.5.9g";
+	public static final String dlVersion = "1.5.9h";
 
 	/** logger for accounting requests */
 	private static Logger accountlog = Logger.getLogger("account.request");