Mercurial > hg > digilib-old
diff servlet/src/digilib/image/JIMIDocuImage.java @ 149:04ad64b2137a
Servlet version 1.14b1
- better performance with thumbnails (really, this time :-)
- new DocuInfo class
- new Directory class
- DocuFile uses String and Directory as data members
- parameter rearrangements
author | robcast |
---|---|
date | Tue, 26 Aug 2003 22:28:43 +0200 |
parents | 63c8186455c1 |
children | e743b853efca |
line wrap: on
line diff
--- a/servlet/src/digilib/image/JIMIDocuImage.java Fri Aug 22 21:12:24 2003 +0200 +++ b/servlet/src/digilib/image/JIMIDocuImage.java Tue Aug 26 22:28:43 2003 +0200 @@ -23,7 +23,6 @@ import java.awt.image.FilteredImageSource; import java.awt.image.ImageFilter; import java.awt.image.ImageProducer; -import java.io.File; import java.io.OutputStream; import com.sun.jimi.core.Jimi; @@ -33,6 +32,7 @@ import com.sun.jimi.core.raster.JimiRasterImage; import digilib.Utils; +import digilib.io.DocuFile; import digilib.io.FileOpException; /** Implementation of DocuImage using the JIMI image Library. */ @@ -53,10 +53,10 @@ /** * load image file */ - public void loadImage(File f) throws FileOpException { + public void loadImage(DocuFile f) throws FileOpException { System.gc(); try { - img = Jimi.getRasterImage(f.toURL()); + img = Jimi.getRasterImage(f.getFile().toURL()); } catch (java.net.MalformedURLException e) { util.dprintln(3, "ERROR(loadImage): MalformedURLException"); } catch (JimiException e) { @@ -94,7 +94,7 @@ return imgHeight; } - public void scale(double scale) throws ImageOpException { + public void scale(double scale, double scaleY) throws ImageOpException { ImageFilter scaleFilter; int destWidth = (int) (scale * (float) imgWidth);