Overview

I created a plugin for Mirador 4 that allows rotating images at arbitrary angles.

https://github.com/nakamura196/mirador-rotation-plugin

You can check the behavior at the following URL.

https://nakamura196.github.io/mirador-rotation-plugin/

Background

I had been developing this plugin for Mirador 3, but Mirador 4 was pre-released on 2024/3/15.

https://github.com/ProjectMirador/mirador/releases/tag/v4.0.0.alpha-1

The latest version of Mirador 3, v3.3.0, was released in 2021, so the libraries it used had become outdated. With this update, development has become easier.

Implementation Details

When rotating images at arbitrary angles, using Mirador 4 as-is resulted in cases where the image rotation could not keep up with angle changes, as shown below.

https://www.youtube.com/watch?v=zJKWCTA9rjw

Therefore, as described in the following article, I am using a customized version of Mirador that adds functionality for performing image rotation, zooming, and scaling without delay.

Specifically, I enabled the immediately parameter provided by OpenSeadragon’s setRotation and similar functions to be configured from Mirador.

https://openseadragon.github.io/docs/OpenSeadragon.Viewport.html#setRotation

!

Although I modified the Mirador core this time, it is possible that such settings can already be configured from the plugin side. I would like to continue investigating.

References

For plugins that rotate images in 90-degree increments, the following is also available.

https://github.com/ProjectMirador/mirador-image-tools

This enables not only rotation but various other image manipulations as well.

Summary

We hope this serves as a useful reference for using Mirador.