[digilib-devel] IIIF Image API 2.0 info.json error and patch
A versatile image viewing environment for the internet
Brought to you by:
robcast
From: Yury E. <yur...@gm...> - 2016-01-18 14:06:02
|
Hi All! We're trying to use digilib with Mirador project and encountered an error in info.json generated by digilib: { "@context": "http://iiif.io/api/image/2/context.json", "@id": "http://localhost/Scaler/IIIF/1012626", "@protocol": "http://iiif.io/api/image", "width": 750, "height": 586, "profile": [ "http://iiif.io/api/image/2/level2.json", { "formats": [ "jpg", "png" ], "qualities": [ "color", "gray" ], "supports": [ "mirroring", "rotationArbitrary", "sizeAboveFull" ] } ] } According to IIIF Image API 'protocol' parameter should go without '@' http://iiif.io/api/image/2.0/#image-information incorrect: "@protocol": "http://iiif.io/api/image" correct: "protocol": "http://iiif.io/api/image" This issue could be patched with this: --- a/servlet/src/main/java/digilib/servlet/ServletOps.java +++ b/servlet/src/main/java/digilib/servlet/ServletOps.java @@ -446,7 +446,7 @@ public class ServletOps { writer.println("{"); writer.println("\"@context\" : \" http://iiif.io/api/image/2/context.json\","); writer.println("\"@id\" : \"" + url + "\","); - writer.println("\"@protocol\" : \"http://iiif.io/api/image\ ","); + writer.println("\"protocol\" : \"http://iiif.io/api/image\ ","); writer.println("\"width\" : " + size.width + ","); writer.println("\"height\" : " + size.height + ","); writer.println("\"profile\" : ["); It would be nice if it's fixed soon. Yury Emelyanov www.vismart.biz |