Mercurial > hg > digilib-old
diff servlet/src/digilib/image/DocuImageImpl.java @ 570:fd2ef7e46119
more cleanup, set version to 1.8.2
author | robcast |
---|---|
date | Tue, 21 Dec 2010 20:24:09 +0100 |
parents | 4c51d71aef13 |
children | beeedf90cb81 |
line wrap: on
line diff
--- a/servlet/src/digilib/image/DocuImageImpl.java Tue Dec 21 09:52:16 2010 +0100 +++ b/servlet/src/digilib/image/DocuImageImpl.java Tue Dec 21 20:24:09 2010 +0100 @@ -28,6 +28,8 @@ import java.util.LinkedList; import java.util.List; +import javax.servlet.ServletException; + import org.apache.log4j.Logger; import digilib.io.FileOpException; @@ -55,6 +57,9 @@ /** image mime-type */ protected String mimeType = null; + /** image size */ + protected ImageSize imgSize = null; + /** * Returns the quality. * @return int @@ -153,15 +158,25 @@ } public int getHeight() { - // TODO Auto-generated method stub + ImageSize is = getSize(); + if (is != null) { + return is.getHeight(); + } return 0; } public int getWidth() { - // TODO Auto-generated method stub + ImageSize is = getSize(); + if (is != null) { + return is.getWidth(); + } return 0; } + public ImageSize getSize() { + return imgSize; + } + public void loadImage(ImageFile f) throws FileOpException { // TODO Auto-generated method stub @@ -173,7 +188,7 @@ } public void writeImage(String mt, OutputStream ostream) - throws FileOpException { + throws ServletException, ImageOpException { // TODO Auto-generated method stub }