Mercurial > hg > digilib-old
diff servlet/src/digilib/servlet/Scaler.java @ 139:11cfe4c89fdc
Servlet version 1.11b1 with improved original-size.
- fixed lots of bugs in metadata handling.
author | robcast |
---|---|
date | Thu, 31 Jul 2003 20:56:51 +0200 |
parents | c36944be0b58 |
children | c878ea574c29 |
line wrap: on
line diff
--- a/servlet/src/digilib/servlet/Scaler.java Sat Jul 12 01:26:56 2003 +0200 +++ b/servlet/src/digilib/servlet/Scaler.java Thu Jul 31 20:56:51 2003 +0200 @@ -58,7 +58,7 @@ public class Scaler extends HttpServlet { // digilib servlet version (for all components) - public static final String dlVersion = "1.11a1"; + public static final String dlVersion = "1.11b1"; // Utils instance with debuglevel Utils util; @@ -401,6 +401,13 @@ fileset.checkMeta(); origResX = fileset.getResX(); origResY = fileset.getResY(); + if ((origResX == 0) || (origResY == 0)) { + throw new ImageOpException("Missing image DPI information!"); + } + + if ((paramDDPIX == 0) || (paramDDPIY == 0)) { + throw new ImageOpException("Missing display DPI information!"); + } } // check the source image @@ -422,7 +429,7 @@ || (paramRGBA != null) || (paramCONT != 0) || (paramBRGT != 0); - boolean imageSendable = mimetypeSendable && ! imagoOptions; + boolean imageSendable = mimetypeSendable && !imagoOptions; /* if not autoRes and image smaller than requested * size then send as is.