← demo catalog · docs

@projektemacher/tify-plugin-hdr

Note: This code was generated with AI assistance — opencode, powered by GLM (Z.ai).

HDR status panel for the TIFY IIIF viewer: device and canvas HDR capability, plus whether the current IIIF image service advertises HDR support. The dock button carries the capability tint.

Chunk enableHdrCanvasOnce() before new Tify(...) — TIFY creates its OpenSeadragon canvas lazily after mount:

import { enableHdrCanvasOnce, hdrPlugin } from '@projektemacher/tify-plugin-hdr';
import '@projektemacher/tify-plugin-core/style.css';

enableHdrCanvasOnce();
const tify = new Tify({ container: '#tify', manifestUrl });
await tify.ready;
const plugin = await hdrPlugin(tify, {
  panelEl: document.querySelector('#panel'),
});

Notes

Example

example/ — HDR canvas status and image service check. Run npm run dev at the repo root and open /packages/plugin-hdr/example/. The example defaults to the wallpaper UltraHDR manifest (https://christianmahnke.de/post/hdr-iiif/manifest.json, single canvas, no text annotations — an empty text view is expected); any manifest URL works via the input box.

Manifest generation

Generate HDR-capable image services with fliiifenleger: UltraHDR JPEGs tiled with --source ultrahdr --sink ultrahdr advertise exactly the https://christianmahnke.de/iiif/hdr/ service entry this plugin checks:

java -jar cli/target/fliiifenleger-cli.jar generate \
  --source ultrahdr \
  --sink ultrahdr \
  --sink-opt quality=90 --sink-opt gainmap-quality=85 \
  -o ./hdr-iiif /path/to/ultrahdr.jpg

Development

npm run build       # dist/ (ESM + declarations)
npm run typecheck
npm run test:i18n   # catalogue coverage for src/ + example/
npm run lint

License: AGPL-3.0-or-later.