Re: [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: Robert C. <ca...@mp...> - 2016-01-18 19:08:00
|
Hi Yury, thanks a lot for the patch. I just applied it to the Sourceforge repo. If you find any more problems with the IIIF-2.0 metadata, please tell me. I haven't been able to really test the info.json with the IIIF validator because it complained (wrongly) about the content type and seemed to not have done any more checks. Cheers Robert On 18.01.16 15:05, Yury Emelyanov wrote: > 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 |