Mercurial > hg > digilib
changeset 1208:ee5d2ce6b11a
non-uniform-scale IIIF parameters throw error now.
author | robcast |
---|---|
date | Mon, 22 Jul 2013 21:18:50 +0200 |
parents | 89880f24a007 |
children | 59d615f4e5f3 e7e2913b382d |
files | common/src/main/java/digilib/conf/DigilibRequest.java |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/common/src/main/java/digilib/conf/DigilibRequest.java Mon Jul 22 20:04:26 2013 +0200 +++ b/common/src/main/java/digilib/conf/DigilibRequest.java Mon Jul 22 21:18:50 2013 +0200 @@ -409,15 +409,18 @@ if (parms[0].startsWith("!")) { // width (in digilib-like bounding box) setValueFromString("dw", parms[0].substring(1)); + } else if (parms[1].length() == 0) { + // width only + setValueFromString("dw", parms[0]); } else { - // according to spec, we should distort the - // image to match ;-( - setValueFromString("dw", parms[0]); + // w,h -- according to spec, we should distort the image to match ;-( + errorMessage = "Non-uniform-scale size parameter in IIIF path not supported!"; + logger.error(errorMessage); + return false; } } if (parms[1].length() > 0) { - // height param (according to spec, we should - // distort the image to match ;-() + // height param setValueFromString("dh", parms[1]); } } catch (Exception e) {