bodleian / archiox-mirador-plugin

An experimental plugin to display depth information captured with Lucida or Selene scanners from FactumARTE. However, the plug-in can present any normal map/albedo map combination produced from any technique.
MIT License
1 stars 0 forks source link

White lines appearing between tiles in some browser versions when OSD re-draws to canvas #88

Closed BeebBenjamin closed 7 months ago

BeebBenjamin commented 9 months ago

White lines are appearing in-between tiles when they are re-drawn by OSD, they do not appear when the tiles are re-assembled in the ThreeJs canvas. However, there is a sub-pixel shortening of the overall layer, because you can see a thin line on the top and right of the layers underneath. So I think the issues are related.

I suspect some anti-aliasing, scaling, or sub-pixel rounding is going on.

White lines do not appear in Google Chrome version: 118.0.5993.117 (Official Build) (64-bit), but it seems to in later versions.

White lines do appear in Firefox version: 120.0.1 (64-bit).

BeebBenjamin commented 9 months ago

Playing around with OpenSeadragon v4.0.1 and the option subPixelRoundingForTransparency fixes it. This isn't really a fix for us because we are constrained in Mirador to what version of OpenSeadragon we can deploy. Unless we put in a PR/MR ourselves to upgrade OpenSeadragon in Mirador Viewer.

BeebBenjamin commented 9 months ago

I may be able to learn what is done to fix this issue and apply our own code in some way.

BeebBenjamin commented 9 months ago

I have a fix for this. Override the Mirador OSD version with v4.1.0 using npm and then add in the osdConfig to the Mirador index.html file, with the following settings:

osdConfig:{
  subPixelRoundingForTransparency: 2
}
BeebBenjamin commented 8 months ago

These lines could be down to iipsrv version too, so there's no guarentee they will appear in a particular implementation

BeebBenjamin commented 8 months ago

I think because we need to override OSD and add a breaking change to the code, e.g. refactor image to data we block this for now and help the Mirador team to get OSD updated. I don't want a weird infrastructure fix for this that only works for our instance.

BeebBenjamin commented 7 months ago

We are going to build our QA plugin with a custom OSD whilst we wait for Mirador to be updated and released on NPM, so that we will be free to experiment and not let OSD version block us.