A web-based viewer for DeepZoom (
.dzi
) images.
towa is a web-based DeepZoom image viewer built using Vite and a fork of OpenSeaDragon that implements support for viewing on-disk DeepZoom pyramids in browsers that support the File System Access API.
Routes can be defined in routes.json
to use towa to serve and display predefined DeepZoom pyramids for various purposes.
The tool itself is located at towa.dev.
Clone the repo, then
npm install
To build the site,
npm run build
and the site files will be available in dist/
.
The site comes with configurable routes that can serve predefined DeepZoom pyramids. To create a route, add an object with configuration values to the routes
array in routes.json
.
[
{
"name": "duomo",
"dziURL": "https://openseadragon.github.io/example-images/duomo/duomo.dzi",
"filesURL": "https://openseadragon.github.io/example-images/duomo/duomo_files",
"title": "Duomo",
"description": "An italian cathedral."
}
]
name
- specifies the name and route of the mosaic. It must be unique.dziURL
- specifies the URL to the.dzi
file. This can be a URL inpublic/
. Note that the contents ofpublic/
will be available in the root directory of the site after it is built (i.e.public/mosaics/duomo.dzi -> /mosaics/duomo.dzi
).filesURL
- (optional) specifies the URL to the_files
directory. If omitted, the URL of the.dzi
file will be implictly used (i.e.duomo.dzi -> duomo_files/
).title
- (optional) specifies the title of the image. This value will be used as the title of the site.description
- (optional) gives a description of the image.
By default, the index of the site routes to the viewer tool. You can disable this by setting viewerAtIndex
to false
in routes.json
.
When viewing a predefined route, the viewer will update the URL with hash parameters containing the current focus and zoom. This can be used to link to specific locations in an image. For example, this link
https://towa.dev/duomo#/0.5972/0.2309/10.6333
will take you to focus (0.5972, 0.2309)
and zoom level 10.6333
in the duomo
image.
Inspired by osd-dzi-viewer.