changeset 293:126684ac4a37

Servlet version 1.5.0b -- the beginning of the next generation :-) - code restructuring to improve scaleability - new Initialiser servlet that must be run first - image transformation work moved to DigilibImageWorker class - Maximum number of concurrent threads limited by Semaphore - old JIMI toolkit implementation removed
author robcast
date Sun, 24 Oct 2004 20:23:49 +0200
parents 1e7cb24f2406
children 5b4fbec16a2c
files servlet/src/digilib/image/ImageLoaderDocuImage.java servlet/src/digilib/image/ImageSize.java
diffstat 2 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/image/ImageLoaderDocuImage.java	Sun Oct 24 20:23:49 2004 +0200
+++ b/servlet/src/digilib/image/ImageLoaderDocuImage.java	Sun Oct 24 20:23:49 2004 +0200
@@ -134,7 +134,7 @@
 			// clean up old reader
 			dispose();
 		}
-		System.gc();
+		//System.gc();
 		RandomAccessFile rf = new RandomAccessFile(f.getFile(), "r");
 		ImageInputStream istream = new FileImageInputStream(rf);
 		//Iterator readers = ImageIO.getImageReaders(istream);
@@ -160,7 +160,7 @@
 	public void loadSubimage(ImageFile f, Rectangle region, int prescale)
 			throws FileOpException {
 		logger.debug("loadSubimage");
-		System.gc();
+		//System.gc();
 		try {
 			if ((reader == null) || (imgFile != f.getFile())) {
 				getReader(f);
--- a/servlet/src/digilib/image/ImageSize.java	Sun Oct 24 20:23:49 2004 +0200
+++ b/servlet/src/digilib/image/ImageSize.java	Sun Oct 24 20:23:49 2004 +0200
@@ -206,8 +206,8 @@
 	 * 
 	 * @return
 	 */
-	public double getAspect() {
-		return (height > 0) ? ((double) width / (double) height) : 0;
+	public float getAspect() {
+		return (height > 0) ? ((float) width / (float) height) : 0;
 	}
 	
 	/* (non-Javadoc)
@@ -215,7 +215,6 @@
 	 */
 	public String toString() {
 		String s = "[" + width + "x" + height + "]";
-		// TODO Auto-generated method stub
 		return s;
 	}
 }