# HG changeset patch # User robcast # Date 1374520730 -7200 # Node ID ee5d2ce6b11ace5c3df5cd65767d7c16bd23a7b7 # Parent 89880f24a00732195be1a9bcf42158ee4f596e6f non-uniform-scale IIIF parameters throw error now. diff -r 89880f24a007 -r ee5d2ce6b11a common/src/main/java/digilib/conf/DigilibRequest.java --- 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) {