← all examples

HDR

Code example
<!-- Viewer and panel hosts in your markup -->
<div id="tify"></div>
<aside id="panel"></aside>
import Tify from 'tify';
import { enableHdrCanvasOnce, hdrPlugin } from '@projektemacher/tify-plugin-hdr';

// CRITICAL: hook the canvas before Tify creates its OpenSeadragon canvas.
const hdrHook = enableHdrCanvasOnce();
const tify = new Tify({ container: '#tify', manifestUrl });
const plugin = await hdrPlugin(tify, {
  panelEl: document.querySelector('#panel'),
  hook: hdrHook,
});