Closed lutzhelm closed 5 years ago
The example I provided does actually work in the viewer because the info.json provides the qualities
in the profile. But this points to another problem - the viewer takes the very first value from that set and uses it for the image requests - in this case it is gray
. The qualities that are actually available are default
and bitonal
(this information is provided by the linked default IIIF v2 level 2 profile https://iiif.io/api/image/2/level2.json) as well as gray
and color
that are additional features in the info.json. The viewer ignores any information from a linked profile.
IIIF v1 requires neither quality
nor profile
to be present in the info.json, but native
has to be supported for every compliance level. IIIF v2 requires profile
to be present as a list and also requires the first entry to be a default compliance level profile. Additionally, every server has to support default
.
In my opinion, the viewer should always use the native
and accordingly default
quality because they have to be supported by all IIIF image servers. If color
is supported it might be used to be sure to get a defined full color quality image. I don't think there is a feature in Kitodo.Presentation that would require another quality than native
/ default
and color
.
The same problem could btw. occur with the formats
. While every IIIF image server has to support jpg on any compliance level in any version (except v1 level 0, but level 0 is currently not supported anyway), the viewer would currently use the first entry in a set of additionally provided formats
. This could be a format that is not supported by all browsers - resulting in a broken image view.
I'd suggest to always use jpg
.
Both your suggestions sound reasonable to me. Would you provide a fix for that?
Done and tested for several IIIF v1 and v2 image servers.
Kitodo.Presentation currently only uses
native
for the image quality URL parameter. This is fine for IIIF Image API version 1, but version 2.1 expects the image quality to be one of the valuesdefault
,color
,bitonal
orgray
and requires image servers to support at least thedefault
quality. While many (maybe even most) version 2 image servers support thenative
quality and treat it likedefault
, some servers don't.Example from the British Library:
I'll provide a pull request.