Fix black line appearing in some images #49
Conversation
Restore the previous size calculation to prevent a black horizontal line appearing in some images. This was caused by the height being calculated as one pixel too short on certain zoom levels.
Thanks for the contribution @tschaef! Could you provide some examples so we can test against this in the future? |
This image url request would now create a non-canonical image api request. Could you provide some examples where you are seeing this so we could address the issue at a larger level? I'm concerned about removing canonical urls as it would not allow Level 0 consumers. |
Hi @mejackreed, thanks for the quick reply and the great work with the plugin. I will try to identify why the problem only appears with certain images and get back to you with some examples. |
Sorry for the long wait, I was travelling. Could you explain how this would create non-canonical requests? The IIIF API allows to provide either width or height or both, even for Level 0, or did I miss something here? |
Sure thing, the canonical uri syntax is described here: http://iiif.io/api/image/2.1/#canonical-uri-syntax From that document in the
As I read this PR, it seems like it introduces size requests that have The behavior you are describing I believe has been removed in the v2.1 image API. See: http://iiif.io/api/image/2.1/compliance/#size cc @azaroth42 to make sure I'm reasoning correctly |
I understood this as just an example, since As for a demo showing the black line: Check the Leaflet-IIIF example page. With the lowest zoom setting, it appears below the image (at least in current Chrome and Firefox). When using tiles, it could appear right in the middle. |
Thanks @tschaef . The way I understand the canonical uri is that As far as the line goes, I think this is due to rounding implementation differences in Leaflet-IIIF and the server. It seems like using |
Unfortunately, this does not work, since the height could still assume non-integer values with no control over how they are rounded. Maybe @azaroth42 could actually give us a hint? |
The issue seems to be fixed, closing this. |
Restore the previous size calculation to prevent a black horizontal line appearing in some images. This was caused by the height being calculated as one pixel too short on certain zoom levels.