diff servlet/src/digilib/image/ImageInfoDocuImage.java @ 588:aee436f0549d stream

more work on stream input
author robcast
date Thu, 06 Jan 2011 14:37:50 +0100
parents 50f291d808b1
children 69bc69381ac4
line wrap: on
line diff
--- a/servlet/src/digilib/image/ImageInfoDocuImage.java	Thu Jan 06 11:57:32 2011 +0100
+++ b/servlet/src/digilib/image/ImageInfoDocuImage.java	Thu Jan 06 14:37:50 2011 +0100
@@ -9,7 +9,6 @@
 
 import org.marcoschmidt.image.ImageInfo;
 
-import digilib.io.ImageFile;
 import digilib.io.ImageInput;
 
 /** Simple abstract implementation of the <code>DocuImage</code> interface.
@@ -20,9 +19,9 @@
 public abstract class ImageInfoDocuImage extends DocuImageImpl {
 
     /** Check image size and type and store in ImageFile f */
-    public ImageInput identify(ImageFile imgf) throws IOException {
+    public ImageInput identify(ImageInput ii) throws IOException {
         // fileset to store the information
-        File f = imgf.getFile();
+        File f = ii.getFile();
         if (f == null) {
             throw new IOException("File not found!");
         }
@@ -36,12 +35,12 @@
         // try with ImageInfo first
         if (iif.check()) {
             ImageSize d = new ImageSize(iif.getWidth(), iif.getHeight());
-            imgf.setSize(d);
-            imgf.setMimetype(iif.getMimeType());
+            ii.setSize(d);
+            ii.setMimetype(iif.getMimeType());
             //logger.debug("  format:"+iif.getFormatName());
             raf.close();
-            logger.debug("image size: " + imgf.getSize());
-            return imgf;
+            logger.debug("image size: " + ii.getSize());
+            return ii;
         } else {
             raf.close();
         }